fix(tests): the column guard names join tables as _BACKED_UP holds them (#3182)
CI & Build / Python lint (push) Successful in 4s
CI & Build / Plugin hooks (push) Successful in 10s
CI & Build / TypeScript typecheck (push) Successful in 23s
CI & Build / integration (push) Successful in 27s
CI & Build / Python tests (push) Successful in 1m8s
CI & Build / Build & push image (push) Successful in 28s
CI & Build / Python lint (push) Successful in 4s
CI & Build / Plugin hooks (push) Successful in 10s
CI & Build / TypeScript typecheck (push) Successful in 23s
CI & Build / integration (push) Successful in 27s
CI & Build / Python tests (push) Successful in 1m8s
CI & Build / Build & push image (push) Successful in 28s
_BACKED_UP carries REAL table names — project_rulebook_subscriptions, project_rule_suppressions, project_topic_suppressions, project_rulebook_exclusions — not the shorter keys the payload uses for the same sections. The registry-coverage assertion used the payload spelling and reported four tables unguarded. The integration round trip passed on this run, which is the half that matters: the real restore_full_backup remaps arose_from_id onto the restored origin.
This commit is contained in:
@@ -242,9 +242,13 @@ def test_the_column_guard_covers_every_table_with_a_row_helper():
|
|||||||
with a new helper, and not to the registry, would be unguarded and look
|
with a new helper, and not to the registry, would be unguarded and look
|
||||||
guarded. Join tables have no model class and carry both their columns by
|
guarded. Join tables have no model class and carry both their columns by
|
||||||
construction, so they are the only permitted absences."""
|
construction, so they are the only permitted absences."""
|
||||||
|
# REAL table names, as _BACKED_UP holds them — not the shorter keys the
|
||||||
|
# payload uses for the same sections. Getting this wrong is what the guard
|
||||||
|
# caught on its own first run.
|
||||||
join_tables = {
|
join_tables = {
|
||||||
"rulebook_subscriptions", "rule_suppressions",
|
"project_rulebook_subscriptions", "project_rule_suppressions",
|
||||||
"topic_suppressions", "rulebook_exclusions", "rule_systems",
|
"project_topic_suppressions", "project_rulebook_exclusions",
|
||||||
|
"rule_systems",
|
||||||
}
|
}
|
||||||
covered = set(_column_guard_targets()) | join_tables
|
covered = set(_column_guard_targets()) | join_tables
|
||||||
assert set(backup._BACKED_UP) - covered == set()
|
assert set(backup._BACKED_UP) - covered == set()
|
||||||
|
|||||||
Reference in New Issue
Block a user