-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20613 from edsantiago/doublecheck_db
systests: add a last-minute check for db backend
- Loading branch information
Showing
2 changed files
with
36 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env bats | ||
# | ||
# Final set of tests to run. | ||
# | ||
|
||
load helpers | ||
|
||
# Confirm that we're still using the same database we started with. | ||
# | ||
# This should never fail! If it does, it means that some test somewhere | ||
# has run podman with --db-backend, which is known to wreak havoc. | ||
# | ||
# See https://github.com/containers/podman/issues/20563 | ||
@test "podman database backend has not changed" { | ||
# File is always written in 005-info.bats. It must always exist | ||
# by the time we get here... | ||
db_backend_file=$BATS_SUITE_TMPDIR/db-backend | ||
|
||
if [[ ! -e "$db_backend_file" ]]; then | ||
# ...except in a manual run like "hack/bats 999" | ||
if [[ $BATS_SUITE_TEST_NUMBER -le 5 ]]; then | ||
skip "$db_backend_file missing, but this is a short manual bats run, so, ok" | ||
fi | ||
|
||
die "Internal error: $db_backend_file does not exist! (check 005-*.bats)" | ||
fi | ||
|
||
run_podman info --format '{{.Host.DatabaseBackend}}' | ||
assert "$output" = "$(<$db_backend_file)" ".Host.DatabaseBackend has changed!" | ||
} |
111b233
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
podman-next COPR build failed. @containers/packit-build please check.