summaryrefslogtreecommitdiff
path: root/test/e2e/pod_start_test.go
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2020-05-29 13:20:22 +0200
committerValentin Rothberg <rothberg@redhat.com>2020-06-11 11:01:13 +0200
commit402c68b41d3fd8f354a4fd0ba4d4101920f8cfe6 (patch)
treeae60cd4ffc1e50a88740b888d4d8d6d0bb5e530e /test/e2e/pod_start_test.go
parent144c6bb76d7652f53167d4bc7130cf897f5903a1 (diff)
downloadpodman-402c68b41d3fd8f354a4fd0ba4d4101920f8cfe6.tar.gz
podman-402c68b41d3fd8f354a4fd0ba4d4101920f8cfe6.tar.bz2
podman-402c68b41d3fd8f354a4fd0ba4d4101920f8cfe6.zip
pod create: add `--infra-conmon-pidfile`
Add an `--infra-conmon-pidfile` flag to `podman-pod-create` to write the infra container's conmon process ID to a specified path. Several container sub-commands already support `--conmon-pidfile` which is especially helpful to allow for systemd to access and track the conmon processes. This allows for easily tracking the conmon process of a pod's infra container. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'test/e2e/pod_start_test.go')
-rw-r--r--test/e2e/pod_start_test.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/e2e/pod_start_test.go b/test/e2e/pod_start_test.go
index 4502a76ed..99285d1e1 100644
--- a/test/e2e/pod_start_test.go
+++ b/test/e2e/pod_start_test.go
@@ -193,4 +193,23 @@ var _ = Describe("Podman pod start", func() {
Expect(session.ExitCode()).To(Equal(0))
Expect(podmanTest.NumberOfContainersRunning()).To(Equal(20)) // 10*(infra+top)
})
+
+ It("podman pod create --infra-conmon-pod create + start", func() {
+ tmpDir, err := ioutil.TempDir("", "")
+ Expect(err).To(BeNil())
+ tmpFile := tmpDir + "podID"
+ defer os.RemoveAll(tmpDir)
+
+ podName := "rudolph"
+ // Create a pod with --infra-conmon-pid.
+ session := podmanTest.Podman([]string{"pod", "create", "--name", podName, "--infra-conmon-pidfile", tmpFile})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+
+ session = podmanTest.Podman([]string{"pod", "start", podName})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(podmanTest.NumberOfContainersRunning()).To(Equal(1)) // infra
+ })
+
})