summaryrefslogtreecommitdiff
path: root/test/system/helpers.bash
diff options
context:
space:
mode:
authorDanila Kiver <danila.kiver@mail.ru>2019-07-04 03:58:37 +0300
committerDanila Kiver <danila.kiver@mail.ru>2019-07-04 03:58:37 +0300
commita54429cf877e899eb1516e3ee71ae9c6eedd7c5a (patch)
treefe676086d21daefe2f1650efbbe7bd2cd7fa1217 /test/system/helpers.bash
parentf5593d305f68409cf093ea6b66a9d1f121ec0fd6 (diff)
downloadpodman-a54429cf877e899eb1516e3ee71ae9c6eedd7c5a.tar.gz
podman-a54429cf877e899eb1516e3ee71ae9c6eedd7c5a.tar.bz2
podman-a54429cf877e899eb1516e3ee71ae9c6eedd7c5a.zip
Use conmon pidfile in generated systemd unit as PIDFile.
By default, podman points PIDFile in generated unit file to non-existent location. As a result, the unit file, generated by podman, is broken: an attempt to start this unit without prior modification results in a crash, because systemd can not find the pidfile of service's main process. Fix the value of "PIDFile" and add a system test for this case. Signed-off-by: Danila Kiver <danila.kiver@mail.ru>
Diffstat (limited to 'test/system/helpers.bash')
-rw-r--r--test/system/helpers.bash11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/system/helpers.bash b/test/system/helpers.bash
index 29ef19ecc..1db80f111 100644
--- a/test/system/helpers.bash
+++ b/test/system/helpers.bash
@@ -236,6 +236,17 @@ function skip_if_remote() {
skip "${1:-test does not work with podman-remote}"
}
+#########################
+# skip_if_not_systemd # ...with an optional message
+#########################
+function skip_if_not_systemd() {
+ if systemctl --user >/dev/null 2>&1; then
+ return
+ fi
+
+ skip "${1:-no systemd or daemon does not respond}"
+}
+
#########
# die # Abort with helpful message
#########