summaryrefslogtreecommitdiff
path: root/test/system
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2022-03-23 14:12:07 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2022-03-23 15:05:30 -0400
commit5e28cbc5fcdd89fc3623fe2324d7ba7fa6117d21 (patch)
tree9b88539a5407c6f9f1d3268412b91a0aac0ac83e /test/system
parentf049cba47c31d31a4a8ed9a9180f0e847be3411c (diff)
downloadpodman-5e28cbc5fcdd89fc3623fe2324d7ba7fa6117d21.tar.gz
podman-5e28cbc5fcdd89fc3623fe2324d7ba7fa6117d21.tar.bz2
podman-5e28cbc5fcdd89fc3623fe2324d7ba7fa6117d21.zip
When running systemd in a container set container_uuid
systemd expects the container_uuid environment variable be set when it is running in a container. Fixes: https://github.com/containers/podman/issues/13187 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'test/system')
-rw-r--r--test/system/250-systemd.bats7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/system/250-systemd.bats b/test/system/250-systemd.bats
index 3847d9510..6c72e14e8 100644
--- a/test/system/250-systemd.bats
+++ b/test/system/250-systemd.bats
@@ -281,6 +281,13 @@ LISTEN_FDNAMES=listen_fdnames" | sort)
is "$output" "" "output should be empty"
}
+@test "podman --systemd sets container_uuid" {
+ run_podman run --systemd=always --name test $IMAGE printenv container_uuid
+ container_uuid=$output
+ run_podman inspect test --format '{{ .ID }}'
+ is "${container_uuid}" "${output:0:32}" "UUID should be first 32 chars of Container id"
+}
+
# https://github.com/containers/podman/issues/13153
@test "podman rootless-netns slirp4netns process should be in different cgroup" {
is_rootless || skip "only meaningful for rootless"