Add a test for containers.conf runtime options

Signed-off-by: Matt Heon <mheon@redhat.com>
This commit is contained in:
Matt Heon
2025-10-16 15:19:08 -04:00
parent 0a20e22384
commit 43ff7a4c13

View File

@@ -58,6 +58,25 @@ echo $rand | 0 | $rand
is "$output" ".*invalidflag" "failed when passing undefined flags to the runtime"
}
# bats test_tags=ci:parallel
@test "podman run - containers.conf runtime options" {
skip_if_remote "requires local containers.conf"
containersConf=$PODMAN_TMPDIR/containers.conf
cat >$containersConf <<EOF
[engine]
runtime="$(podman_runtime)"
[engine.runtimes_flags]
$(podman_runtime) = [
"invalidflag",
]
EOF
CONTAINERS_CONF="$containersConf" run_podman 126 run --rm $IMAGE
is "$output" ".*invalidflag" "failed when passing undefined flags to the runtime"
}
# bats test_tags=ci:parallel
@test "podman run --memory=0 runtime option" {
run_podman run --memory=0 --rm $IMAGE echo hello