mirror of
https://github.com/block/buzz.git
synced 2026-10-28 21:11:48 +00:00
test(db): validate current catalog after completing the legacy upgrade
Signed-off-by: Brain <1a02c72794dcd0f07058a353bc3a81f4028b8c77c92c87fce6d5c8b85970a20b@buzz.block.builderlab.xyz>
This commit is contained in:
@@ -2786,10 +2786,16 @@ mod postgres_tests {
|
||||
"all NIP-FI tables must be absent after migration 0044: {present:?}"
|
||||
);
|
||||
|
||||
// The deletion catalog must validate with ledger relations gone.
|
||||
// Ledger absence above is checked at 0044. The current binary's deletion
|
||||
// catalog describes the latest schema (including later scoped tables),
|
||||
// so finish the upgrade before asking it to validate serving readiness.
|
||||
MIGRATOR
|
||||
.run(&pool)
|
||||
.await
|
||||
.expect("finish migrations after ledger removal");
|
||||
crate::deletion::DeletionStore::new(pool.clone())
|
||||
.validate_catalog()
|
||||
.await
|
||||
.expect("deletion catalog validates after migration 0044");
|
||||
.expect("current deletion catalog validates after upgrading from migration 0044");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user