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

@ -282,6 +282,16 @@ func WithRegistriesConf(path string) RuntimeOption {
}
}
// WithDatabaseBackend configures the runtime's database backend.
func WithDatabaseBackend(value string) RuntimeOption {
logrus.Debugf("Setting custom database backend: %q", value)
return func(rt *Runtime) error {
// The value will be parsed later on.
rt.config.Engine.DBBackend = value
return nil
}
}
// WithHooksDir sets the directories to look for OCI runtime hook configuration.
func WithHooksDir(hooksDirs ...string) RuntimeOption {
return func(rt *Runtime) error {