Joseph Doherty
e7b6fe33a4
test(configdb): guard test for AuditLog append-only invariant (M2.10, #18 )
...
Adds AuditLogAppendOnlyGuardTests.cs to
tests/ZB.MOM.WW.ScadaBridge.ConfigurationDatabase.Tests/ — a code-level backstop
for the DB-role DENY UPDATE / DENY DELETE control established in migration
20260602174346_CollapseAuditLogToCanonical.
The guard scans every non-Designer, non-Snapshot *.cs file in the
ConfigurationDatabase source tree and fails the test run if any line matches the
DML-syntax pattern:
UPDATE\s+(?:dbo\.)?AuditLog\b
DELETE\s+(?:FROM\s+)?(?:dbo\.)?AuditLog\b
The tight DML-syntax pattern naturally excludes false positives without extra
exclusion checks: DENY UPDATE ON dbo.AuditLog is not matched (UPDATE is followed
by ON, not the table name); ALTER TABLE … SWITCH and TRUNCATE contain no UPDATE/
DELETE keyword; comments with UPDATE/AuditLog in separate clauses are not matched.
Self-verifying unit tests (ContainsAuditLogMutation_*) prove the helper:
- returns false on clean-source lines (INSERT, SELECT, DENY DDL, ALTER SWITCH,
TRUNCATE, DELETE FROM Notifications);
- returns TRUE on planted violations (UPDATE AuditLog SET …, DELETE FROM
dbo.AuditLog WHERE …, lower-case variants);
- returns false on the exact DENY/GRANT/partition-switch strings from the
production migration files.
All 256 ConfigurationDatabase.Tests pass; solution builds 0 W / 0 E.
2026-06-16 05:49:51 -04:00
..
2026-06-01 00:23:00 -04:00
2026-03-21 01:11:35 -04:00
2026-03-21 01:11:35 -04:00
2026-03-21 01:11:35 -04:00
2026-03-21 01:11:35 -04:00
2026-03-21 01:11:35 -04:00
2026-03-21 01:11:35 -04:00
2026-03-21 01:11:35 -04:00
2026-03-21 01:11:35 -04:00
2026-03-17 13:30:23 -04:00
2026-05-28 09:37:45 -04:00
2026-03-17 13:35:54 -04:00
2026-05-28 09:37:45 -04:00
2026-03-17 14:35:52 -04:00
2026-05-28 09:37:45 -04:00
2026-03-21 11:32:24 -04:00
2026-06-01 00:23:00 -04:00
2026-05-28 09:37:45 -04:00
2026-03-22 08:13:23 -04:00
2026-05-28 09:37:45 -04:00
2026-03-24 16:19:39 -04:00
2026-05-28 09:37:45 -04:00
2026-05-28 09:37:45 -04:00
2026-05-28 09:37:45 -04:00
2026-05-28 09:37:45 -04:00
2026-05-11 10:27:39 -04:00
2026-05-28 09:37:45 -04:00
2026-05-28 09:37:45 -04:00
2026-06-01 00:23:00 -04:00
2026-05-28 09:37:45 -04:00
2026-05-12 00:33:51 -04:00
2026-05-28 09:37:45 -04:00
2026-05-12 05:38:58 -04:00
2026-05-28 09:37:45 -04:00
2026-05-28 09:37:45 -04:00
2026-05-28 09:37:45 -04:00
2026-05-16 05:25:10 -04:00
2026-05-28 09:37:45 -04:00
2026-05-28 09:37:45 -04:00
2026-05-18 23:01:30 -04:00
2026-05-28 09:37:45 -04:00
2026-05-19 11:26:37 -04:00
2026-05-19 11:30:21 -04:00
2026-05-19 11:30:21 -04:00
2026-05-28 09:37:45 -04:00
2026-05-28 09:37:45 -04:00
2026-05-19 05:01:58 -04:00
2026-05-28 09:37:45 -04:00
2026-05-19 06:31:23 -04:00
2026-05-28 09:37:45 -04:00
2026-05-31 21:50:38 -04:00
2026-05-28 09:37:45 -04:00
2026-05-28 09:37:45 -04:00
2026-05-28 09:37:45 -04:00
2026-05-28 09:37:45 -04:00
2026-05-20 16:56:56 -04:00
2026-05-20 17:44:12 -04:00
2026-05-20 19:43:30 -04:00
2026-05-28 09:37:45 -04:00
2026-05-28 09:37:45 -04:00
2026-05-20 07:32:47 -04:00
2026-05-28 09:37:45 -04:00
2026-05-28 09:37:45 -04:00
2026-05-21 14:37:12 -04:00
2026-05-28 09:37:45 -04:00
2026-05-21 06:41:53 -04:00
2026-05-28 09:37:45 -04:00
2026-05-28 09:37:45 -04:00
2026-05-21 16:58:07 -04:00
2026-05-22 01:13:11 -04:00
2026-05-28 09:37:45 -04:00
2026-05-22 02:03:36 -04:00
2026-05-28 09:37:45 -04:00
2026-05-23 15:34:44 -04:00
2026-05-28 09:37:45 -04:00
2026-05-28 09:37:45 -04:00
2026-05-23 05:36:08 -04:00
2026-05-31 23:32:53 -04:00
2026-05-28 09:37:45 -04:00
2026-06-02 01:23:52 -04:00
2026-05-24 07:26:20 -04:00
2026-05-31 21:50:38 -04:00
2026-05-24 04:52:59 -04:00
2026-05-31 21:50:38 -04:00
2026-05-28 09:37:45 -04:00
2026-05-29 07:28:21 -04:00
2026-05-29 07:39:44 -04:00
2026-05-29 08:12:43 -04:00
2026-06-01 00:23:00 -04:00
2026-05-28 11:43:04 -04:00
2026-05-28 11:43:04 -04:00
2026-05-28 09:27:31 -04:00
2026-05-29 15:14:01 -04:00
2026-06-01 00:23:00 -04:00
2026-05-31 03:29:37 -04:00
2026-05-31 21:58:49 -04:00
2026-05-31 21:39:23 -04:00
2026-05-31 22:05:13 -04:00
2026-06-03 13:58:14 -04:00
2026-06-03 15:24:05 -04:00
2026-06-03 15:24:05 -04:00
2026-06-05 09:39:35 -04:00
2026-06-05 09:52:12 -04:00
2026-06-05 09:52:12 -04:00
2026-06-06 11:23:59 -04:00
2026-06-06 11:44:56 -04:00
2026-06-06 12:37:47 -04:00
2026-06-06 13:55:19 -04:00
2026-06-06 13:59:21 -04:00
2026-06-06 14:31:18 -04:00
2026-06-06 16:10:07 -04:00
2026-06-07 03:26:25 -04:00
2026-06-07 04:33:16 -04:00
2026-06-07 09:53:34 -04:00
2026-06-07 10:00:48 -04:00
2026-06-07 10:31:02 -04:00
2026-06-15 09:27:00 -04:00
2026-06-15 15:04:28 -04:00
2026-06-16 05:49:51 -04:00
2026-06-15 09:32:14 -04:00
2026-06-15 09:32:14 -04:00
2026-05-28 09:37:45 -04:00
2026-06-01 00:23:00 -04:00
2026-06-01 00:23:00 -04:00
2026-05-18 22:57:45 -04:00
2026-05-28 09:37:45 -04:00
2026-05-28 09:37:45 -04:00
2026-05-28 09:37:45 -04:00
2026-03-16 19:51:49 -04:00
2026-03-16 20:13:04 -04:00
2026-03-21 01:11:35 -04:00
2026-03-16 20:35:24 -04:00
2026-03-21 01:11:35 -04:00
2026-03-16 20:57:46 -04:00
2026-05-13 13:30:07 -04:00
2026-03-16 22:19:29 -04:00
2026-03-21 01:11:35 -04:00
2026-03-16 22:19:29 -04:00
2026-05-13 13:30:07 -04:00
2026-03-16 15:34:54 -04:00
2026-03-16 22:19:29 -04:00
2026-03-16 22:19:29 -04:00
2026-03-16 15:34:54 -04:00
2026-03-16 22:19:29 -04:00
2026-03-16 15:34:54 -04:00
2026-03-16 22:19:29 -04:00
2026-03-16 15:34:54 -04:00
2026-05-13 13:30:07 -04:00
2026-05-13 13:30:07 -04:00