summaryrefslogtreecommitdiff
path: root/test/e2e/pod_create_test.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2021-02-15 09:32:49 -0600
committerMatthew Heon <mheon@redhat.com>2021-02-18 10:37:36 -0500
commite9328d13f4d6360fe772bc18475e0e71ae8280b9 (patch)
tree6fd02f7feb1bc78e57adc855b167a5a25cc5e673 /test/e2e/pod_create_test.go
parent32350c758ddfef52a53e7d74d4a68785bc54aaef (diff)
downloadpodman-e9328d13f4d6360fe772bc18475e0e71ae8280b9.tar.gz
podman-e9328d13f4d6360fe772bc18475e0e71ae8280b9.tar.bz2
podman-e9328d13f4d6360fe772bc18475e0e71ae8280b9.zip
Fix panic in pod creation
when creating a pod with --infra-image and using a untagged image for the infra-image (none/none), the lookup for the image's name was creating a panic. Fixes: #9374 Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'test/e2e/pod_create_test.go')
-rw-r--r--test/e2e/pod_create_test.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/e2e/pod_create_test.go b/test/e2e/pod_create_test.go
index e57712f62..0a7a5101e 100644
--- a/test/e2e/pod_create_test.go
+++ b/test/e2e/pod_create_test.go
@@ -501,4 +501,18 @@ entrypoint ["/fromimage"]
Expect(session.OutputToString()).To(ContainSubstring("inet 127.0.0.1/8 scope host lo"))
Expect(len(session.OutputToStringArray())).To(Equal(1))
})
+
+ It("podman pod create --infra-image w/untagged image", func() {
+ podmanTest.AddImageToRWStore(ALPINE)
+ dockerfile := `FROM quay.io/libpod/alpine:latest
+ENTRYPOINT ["sleep","99999"]
+ `
+ // This builds a none/none image
+ iid := podmanTest.BuildImage(dockerfile, "", "true")
+
+ create := podmanTest.Podman([]string{"pod", "create", "--infra-image", iid})
+ create.WaitWithDefaultTimeout()
+ Expect(create.ExitCode()).To(BeZero())
+ })
+
})