Golden fixtures
Applies to SEAM 1
Golden fixtures are real stores and files committed to the source tree. Tests open every one of them with the current build, compare reads against a recorded result, migrate them and check refusals. Every artifact revision that raised the store stamp added a fixture directory v{N} (SPEC V455).
The fixtures
Section titled “The fixtures”| Path | Content |
|---|---|
crates/strata-server/tests/fixtures/format/v1 to v4 |
A full store per pre-release stamp: data, at least two unflushed WAL segments, keyring, blob objects, a base backup and expected.json. Cut by crates/strata-server/examples/format_fixture.rs with a fixed test master key documented in SPEC V455. |
crates/strata-server/tests/format_fixtures.rs |
Opens every v* up to the current stamp on a copy, compares reads, migrates, and checks refusals. |
crates/strata-server/tests/format4_twin.rs, migrate_cli.rs, postings_migrate.rs |
Migration equivalence. |
crates/strata-lsm/tests/fixtures/ranged_bloom |
One footer revision 4 file plus keyring (ranged_bloom_fixture.rs). Walked through byte by byte in the appendix. |
crates/strata-lsm/tests/fixtures/block_counts |
One footer revision 5 file with stats revision 2 (block_counts_fixture.rs). See the block-counts fixture. |
crates/strata-sql/tests/postings_format.rs |
Golden posting-block bytes, including revision 5. |
The fixture directories v1 to v4 correspond to pre-1 to pre-4; v4 is the layout SEAM 1 adopts.
What each store fixture holds
Section titled “What each store fixture holds”| Fixture | Structures that appear in it |
|---|---|
v4 |
Typed-key columnar blocks (revision 5), 0xE4 and 0xE5 posting blocks (0xE4, 0xE5) and ranged bloom files (footer revision 4) |
v3 |
Key-reference blocks (columnar revision 4) |
v2 |
0xE3 posting blocks (0xE3) |
v1 |
None of these |
The test master key lives in the test source and is not reproduced anywhere in this wiki.