sqlite: add a hidden --db-backend flag

Add a hidden flag to set the database backend and plumb it into
podman-info.  Further add a system test to make sure the flag and the
info output are working properly.

Note that the test may need to be changed once we settled on how
to test the sqlite backend in CI.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
Valentin Rothberg
2023-03-02 11:41:36 +01:00
parent 96d439913e
commit e77f370f86
7 changed files with 49 additions and 16 deletions

View File

@ -150,4 +150,16 @@ host.slirp4netns.executable | $expr_path
fi
}
@test "podman --db-backend info - basic output" {
# TODO: this tests needs to change once sqlite is being tested in the system tests
skip_if_remote "--db-backend does not work on a remote client"
for backend in boltdb sqlite; do
run_podman --db-backend=$backend info --format "{{ .Host.DatabaseBackend }}"
is "$output" "$backend"
done
run_podman 125 --db-backend=bogus info --format "{{ .Host.DatabaseBackend }}"
is "$output" "Error: unsupported database backend: \"bogus\""
}
# vim: filetype=sh