-
Notifications
You must be signed in to change notification settings - Fork 478
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/metamorphic: add support for an initial database state
Adjust the metamorphic tests to support three new command-line flags: `--previous-ops` — The path of a previous metamorphic test's `ops` file. The ops file is read to prepopulate the op generator's key set, ensuring the test generates operations that frequently draw from the keys that already exist in the database. `--initial-state` — The path of a previous metamorphic run's `data` directory, containing the state at the end of the test. Before each run of the metamorphic test, the contents of the initial state directory are copied into the test's VFS. `--initial-state-desc` — A human-readable string describing the origin of `initial-state`. This parameter has no functional purpose, but it's persisted within the `OPTIONS` file to record the historical lineage of a test database to aid in reproduction. Subsequent work will build a small harness that takes multiple `metamorphic.test` binaries (eg, generated from `go test -c ./internal/metamorphic`) built from separate SHAs, and invokes the metamorphic tests, propagating data directories from older SHA runs to newer SHA runs. Informs #1612.
- Loading branch information
Showing
15 changed files
with
344 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.