Skip to content

test(pxe): share schema-mismatch wipe helper across db-compatibility tests#24615

Merged
vezenovm merged 2 commits into
mv/f-680-migrate-pxe-tagging-storesfrom
mv/pxe-schema-wipe-test-helper
Jul 8, 2026
Merged

test(pxe): share schema-mismatch wipe helper across db-compatibility tests#24615
vezenovm merged 2 commits into
mv/f-680-migrate-pxe-tagging-storesfrom
mv/pxe-schema-wipe-test-helper

Conversation

@vezenovm

@vezenovm vezenovm commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Stacked on #24604.

Extracts the duplicated schema-mismatch DB-wipe ceremony in the PXE storage compatibility suite into one helper.

The two "wipes rows written under schema vN" tests (the key-store removal at the schema-10 boundary, and the tagging-store key-format migration at the schema-12 boundary added earlier in this stack) were near-identical boilerplate: make a temp dir + pxe_data config, open the store at the old schema version, seed a legacy row, close, reopen at the current PXE_DATA_SCHEMA_VERSION (which makes DatabaseVersionManager wipe the mismatched DB on open), assert the row is gone, then remove the temp dir.

expectStoreWipedOnUpgradeFrom(oldSchemaVersion, tmpDirPrefix, seedLegacyRows, assertWiped) now owns that lifecycle, so each test spells out only its own legacy write and post-wipe assertion, and the next schema-bump wipe test is a few lines rather than a copy of the whole dance. The shared "wipes on version mismatch" explanation moves into the helper's JSDoc; each test comment stays focused on its own assertion.

@vezenovm vezenovm added ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure ci-draft Run CI on draft PRs. and removed ci-draft Run CI on draft PRs. labels Jul 8, 2026
@vezenovm vezenovm merged commit b98b43c into mv/f-680-migrate-pxe-tagging-stores Jul 8, 2026
7 of 9 checks passed
@vezenovm vezenovm deleted the mv/pxe-schema-wipe-test-helper branch July 8, 2026 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant