summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-06-17 15:25:09 -0400
committerGitHub <noreply@github.com>2020-06-17 15:25:09 -0400
commitfd184fa4a1d0bd7797de1fb062c90e1a6d56bd1e (patch)
tree08d480ab4e980643fdb158ded79e57b937a4192b /test/e2e
parent5694104c24f36d8575853a48e8ba3cdbf87b8f5c (diff)
parent6f1440a3ec16dfbf644acb87012967bc297ec975 (diff)
downloadpodman-fd184fa4a1d0bd7797de1fb062c90e1a6d56bd1e.tar.gz
podman-fd184fa4a1d0bd7797de1fb062c90e1a6d56bd1e.tar.bz2
podman-fd184fa4a1d0bd7797de1fb062c90e1a6d56bd1e.zip
Merge pull request #6522 from mheon/unless-stopped
Add support for the unless-stopped restart policy
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/create_test.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/e2e/create_test.go b/test/e2e/create_test.go
index 822e470f2..52ce0b46a 100644
--- a/test/e2e/create_test.go
+++ b/test/e2e/create_test.go
@@ -401,6 +401,20 @@ var _ = Describe("Podman create", func() {
Expect(session.ExitCode()).To(Not(Equal(0)))
})
+ It("podman create with --restart-policy unless-stopped", func() {
+ ctrName := "testctr"
+ unlessStopped := "unless-stopped"
+ session := podmanTest.Podman([]string{"create", "-t", "--restart", unlessStopped, "--name", ctrName, ALPINE, "/bin/sh"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+
+ inspect := podmanTest.Podman([]string{"inspect", ctrName})
+ inspect.WaitWithDefaultTimeout()
+ data := inspect.InspectContainerToJSON()
+ Expect(len(data)).To(Equal(1))
+ Expect(data[0].HostConfig.RestartPolicy.Name).To(Equal(unlessStopped))
+ })
+
It("podman create with -m 1000000 sets swap to 2000000", func() {
numMem := 1000000
ctrName := "testCtr"