diff options
Diffstat (limited to 'test/system')
-rw-r--r-- | test/system/001-basic.bats | 7 | ||||
-rw-r--r-- | test/system/250-systemd.bats | 23 |
2 files changed, 23 insertions, 7 deletions
diff --git a/test/system/001-basic.bats b/test/system/001-basic.bats index 5d44c373f..97ef61511 100644 --- a/test/system/001-basic.bats +++ b/test/system/001-basic.bats @@ -15,13 +15,6 @@ function setup() { @test "podman version emits reasonable output" { run_podman version - # FIXME FIXME FIXME: #10248: nasty message on Ubuntu cgroups v1, rootless - if [[ "$output" =~ "overlay test mount with multiple lowers failed" ]]; then - if is_rootless; then - lines=("${lines[@]:1}") - fi - fi - # First line of podman-remote is "Client:<blank>". # Just delete it (i.e. remove the first entry from the 'lines' array) if is_remote; then diff --git a/test/system/250-systemd.bats b/test/system/250-systemd.bats index b42769409..4ea192009 100644 --- a/test/system/250-systemd.bats +++ b/test/system/250-systemd.bats @@ -125,4 +125,27 @@ function service_cleanup() { service_cleanup } +# These tests can fail in dev. environment because of SELinux. +# quick fix: chcon -t container_runtime_exec_t ./bin/podman +@test "podman generate systemd - envar" { + xdg_rootless + + cname=$(random_string) + FOO=value BAR=%s run_podman create --name $cname --env FOO -e BAR --env MYVAR=myval \ + $IMAGE sh -c 'printenv && sleep 100' + + # Start systemd service to run this container + service_setup + + # Give container time to start; make sure output looks top-like + sleep 2 + run_podman logs $cname + is "$output" ".*FOO=value.*" "FOO environment variable set" + is "$output" ".*BAR=%s.*" "BAR environment variable set" + is "$output" ".*MYVAR=myval.*" "MYVAL environment variable set" + + # All good. Stop service, clean up. + service_cleanup +} + # vim: filetype=sh |