Gating tests: use loginctl

- instead of hacky mkdir /run/user/<fedora id>,
  use loginctl enable-linger and hope that it
  has the same effect.

  reason: the mkdir doesn't seem to be 100% effective.
  There are cases in which the first rootless podman
  invocation fails with:

    Error: could not get runtime: cannot mkdir /run/user/1000/libpod: mkdir /run/user/1000/libpod: no such file or directory

Signed-off-by: Ed Santiago <santiago@redhat.com>
This commit is contained in:
Ed Santiago 2019-10-09 08:10:13 -06:00
parent e32408688c
commit 9def1dd905

View File

@ -18,5 +18,5 @@
# running the test with su doesn't create the directory for fedora user on /run/user/
# so create it manually
dir: ./
run: mkdir /run/user/$(id -u fedora); chown fedora /run/user/$(id -u fedora); su -c ${PWD}/test_podman.sh - fedora
run: loginctl enable-linger fedora; su -c ${PWD}/test_podman.sh - fedora
timeout: 15m