diff options
author | Jordan Christiansen <xordspar0@gmail.com> | 2020-10-18 17:31:10 -0500 |
---|---|---|
committer | Jordan Christiansen <xordspar0@gmail.com> | 2020-10-19 10:06:17 -0500 |
commit | 8cbf7700a557b9f0a58664c8b0f400b30fae5709 (patch) | |
tree | 0964e98fef852423fd4dbf1ae7b7e5900cad19d4 /test | |
parent | 6ec96dc009d73cc2b0a3fa81149ca599b04252e4 (diff) | |
download | podman-8cbf7700a557b9f0a58664c8b0f400b30fae5709.tar.gz podman-8cbf7700a557b9f0a58664c8b0f400b30fae5709.tar.bz2 podman-8cbf7700a557b9f0a58664c8b0f400b30fae5709.zip |
Make invalid image name error more specific
Previously, using an invalid image name would produce an error like
this:
Error: error encountered while bringing up pod test-pod-0: invalid reference format
This message didn't specify that there was an problem with an image
name, and it didn't specify which image name had a problem if there were
multiple. Now the error reads:
Error: error encountered while bringing up pod test-pod-0: Failed to parse image "./myimage": invalid reference format
Signed-off-by: Jordan Christiansen <xordspar0@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/play_kube_test.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/e2e/play_kube_test.go b/test/e2e/play_kube_test.go index 3906fa49d..7ab8dc6f8 100644 --- a/test/e2e/play_kube_test.go +++ b/test/e2e/play_kube_test.go @@ -1447,4 +1447,23 @@ MemoryReservation: {{ .HostConfig.MemoryReservation }}`}) Expect(inspect.OutputToString()).To(ContainSubstring("Memory: " + expectedMemoryLimit)) } }) + + It("podman play kube reports invalid image name", func() { + invalidImageName := "./myimage" + + pod := getPod( + withCtr( + getCtr( + withImage(invalidImageName), + ), + ), + ) + err := generateKubeYaml("pod", pod, kubeYaml) + Expect(err).To(BeNil()) + + kube := podmanTest.Podman([]string{"play", "kube", kubeYaml}) + kube.WaitWithDefaultTimeout() + Expect(kube.ExitCode()).To(Equal(125)) + Expect(kube.ErrorToString()).To(ContainSubstring(invalidImageName)) + }) }) |