aboutsummaryrefslogtreecommitdiff
path: root/test/system/250-systemd.bats
diff options
context:
space:
mode:
authorEd Santiago <santiago@redhat.com>2020-05-14 09:55:25 -0600
committerEd Santiago <santiago@redhat.com>2020-05-14 09:55:25 -0600
commitcd85ba196d89c6d9ba9a8a2b27dc8bfeca5effb4 (patch)
tree426319bbda082dfd2f9f7c156fb80b2354ead821 /test/system/250-systemd.bats
parent7e9ed37c0997d6dd2d6fc6ed6476039ee954286c (diff)
downloadpodman-cd85ba196d89c6d9ba9a8a2b27dc8bfeca5effb4.tar.gz
podman-cd85ba196d89c6d9ba9a8a2b27dc8bfeca5effb4.tar.bz2
podman-cd85ba196d89c6d9ba9a8a2b27dc8bfeca5effb4.zip
system tests: small fixes for rawhide+cgroups v1
Three small fixes for breaking tests on rawhide: 1) run test: looks like runc changed the format of an error message, adding a colon in one place. runc is used on rawhide when booted in cgroups v1 2) volumes test: difference in exit status and error message between runc and crun. 3) systemd test: define XDG_RUNTIME_DIR if unset. podman helpfully sets this to a reasonable default, but the 'systemctl' commands used in this test do not. Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'test/system/250-systemd.bats')
-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 cdac43c1c..4bee13414 100644
--- a/test/system/250-systemd.bats
+++ b/test/system/250-systemd.bats
@@ -33,6 +33,13 @@ function teardown() {
# This test can fail in dev. environment because of SELinux.
# quick fix: chcon -t container_runtime_exec_t ./bin/podman
@test "podman generate - systemd - basic" {
+ # podman initializes this if unset, but systemctl doesn't
+ if is_rootless; then
+ if [ -z "$XDG_RUNTIME_DIR" ]; then
+ export XDG_RUNTIME_DIR=/run/user/$(id -u)
+ fi
+ fi
+
cname=$(random_string)
run_podman create --name $cname --detach $IMAGE top