diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2023-03-16 16:00:20 -0400 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2023-03-16 18:43:03 -0400 |
commit | bfb9eb87fe98f96969188df9df866e15800bd55b (patch) | |
tree | 1bb94f3b5aa283e9fd2c294a7bbd458eb6ba3950 /tests/db-migration.sh | |
parent | 7f46ebcf90432a54f5fdec1931d87e5130e68190 (diff) |
Cleanup test skipping
- Try not to put cryptic "99" in many places
Factor out `exit 99` into `skipTest` function
- Alows make sure skipping a test is done with a reason
`skipTest` takes a mandatory argument
- Separate pure conditionals vs side-effectful test skipping.
"require daemon" already had this, but "sandbox support" did not.
Diffstat (limited to 'tests/db-migration.sh')
-rw-r--r-- | tests/db-migration.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/db-migration.sh b/tests/db-migration.sh index 7d243eefb..44cd16bc0 100644 --- a/tests/db-migration.sh +++ b/tests/db-migration.sh @@ -1,13 +1,13 @@ # Test that we can successfully migrate from an older db schema +source common.sh + # Only run this if we have an older Nix available # XXX: This assumes that the `daemon` package is older than the `client` one if [[ -z "${NIX_DAEMON_PACKAGE-}" ]]; then - exit 99 + skipTest "not using the Nix daemon" fi -source common.sh - killDaemon # Fill the db using the older Nix |