summaryrefslogtreecommitdiff
path: root/test/e2e/create_test.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-06-15 12:54:36 -0400
committerGitHub <noreply@github.com>2020-06-15 12:54:36 -0400
commit10c6c806ea6d7830c248d9c89cd5ec3a7a515a63 (patch)
tree837474da079889daa027b66e5239915dd983f7ab /test/e2e/create_test.go
parentb89729778c253f0eccd2dd762e5d0a6547aaea7d (diff)
parent6118ab494884eea62c388fa1536349f05cdac9d3 (diff)
downloadpodman-10c6c806ea6d7830c248d9c89cd5ec3a7a515a63.tar.gz
podman-10c6c806ea6d7830c248d9c89cd5ec3a7a515a63.tar.bz2
podman-10c6c806ea6d7830c248d9c89cd5ec3a7a515a63.zip
Merge pull request #6553 from vrothberg/replace
--replace for containers and pods
Diffstat (limited to 'test/e2e/create_test.go')
-rw-r--r--test/e2e/create_test.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/e2e/create_test.go b/test/e2e/create_test.go
index b9a1ff83d..822e470f2 100644
--- a/test/e2e/create_test.go
+++ b/test/e2e/create_test.go
@@ -429,4 +429,19 @@ var _ = Describe("Podman create", func() {
Expect(len(data)).To(Equal(1))
Expect(data[0].HostConfig.NanoCpus).To(Equal(int64(nanoCPUs)))
})
+
+ It("podman create --replace", func() {
+ // Make sure we error out with --name.
+ session := podmanTest.Podman([]string{"create", "--replace", ALPINE, "/bin/sh"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(125))
+
+ // Create and replace 5 times in a row the "same" container.
+ ctrName := "testCtr"
+ for i := 0; i < 5; i++ {
+ session = podmanTest.Podman([]string{"create", "--replace", "--name", ctrName, ALPINE, "/bin/sh"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ }
+ })
})