diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-04-13 01:32:37 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-13 01:32:37 -0700 |
commit | 852ca40665d7a0b08ee749e08cb46625c9763f35 (patch) | |
tree | 6935833e4449d993c2bd0c99507b47392345a5ae /test | |
parent | 15723671b3edefd3cac150dc86323aa1f701ef8d (diff) | |
parent | 0a7b5b4e086ee4583b8550d80934dfa5c356ff64 (diff) | |
download | podman-852ca40665d7a0b08ee749e08cb46625c9763f35.tar.gz podman-852ca40665d7a0b08ee749e08cb46625c9763f35.tar.bz2 podman-852ca40665d7a0b08ee749e08cb46625c9763f35.zip |
Merge pull request #2910 from giuseppe/fix-create-2-containers
create: fix segfault if container name already exists
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/create_test.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/e2e/create_test.go b/test/e2e/create_test.go index 6ed5ad2d8..105cba37c 100644 --- a/test/e2e/create_test.go +++ b/test/e2e/create_test.go @@ -70,6 +70,17 @@ var _ = Describe("Podman create", func() { Expect(podmanTest.NumberOfContainers()).To(Equal(1)) }) + It("podman create using existing name", func() { + session := podmanTest.Podman([]string{"create", "--name=foo", ALPINE, "ls"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + Expect(podmanTest.NumberOfContainers()).To(Equal(1)) + + session = podmanTest.Podman([]string{"create", "--name=foo", ALPINE, "ls"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(125)) + }) + It("podman create adds annotation", func() { session := podmanTest.Podman([]string{"create", "--annotation", "HELLO=WORLD", ALPINE, "ls"}) session.WaitWithDefaultTimeout() |