summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/play_kube_test.go19
-rw-r--r--test/e2e/runlabel_test.go5
-rw-r--r--test/e2e/trust_test.go22
3 files changed, 45 insertions, 1 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))
+ })
})
diff --git a/test/e2e/runlabel_test.go b/test/e2e/runlabel_test.go
index 81a746b86..7c0b8bc9b 100644
--- a/test/e2e/runlabel_test.go
+++ b/test/e2e/runlabel_test.go
@@ -88,12 +88,15 @@ var _ = Describe("podman container runlabel", func() {
result := podmanTest.Podman([]string{"container", "runlabel", "RUN", ALPINE})
result.WaitWithDefaultTimeout()
Expect(result).To(ExitWithError())
+ // should not panic when label missing the value or don't have the label
+ Expect(result.LineInOutputContains("panic")).NotTo(BeTrue())
})
It("podman container runlabel bogus label in remote image should result in non-zero exit", func() {
result := podmanTest.Podman([]string{"container", "runlabel", "RUN", "docker.io/library/ubuntu:latest"})
result.WaitWithDefaultTimeout()
Expect(result).To(ExitWithError())
-
+ // should not panic when label missing the value or don't have the label
+ Expect(result.LineInOutputContains("panic")).NotTo(BeTrue())
})
It("podman container runlabel global options", func() {
diff --git a/test/e2e/trust_test.go b/test/e2e/trust_test.go
index 82b0f9f26..987023e4c 100644
--- a/test/e2e/trust_test.go
+++ b/test/e2e/trust_test.go
@@ -74,4 +74,26 @@ var _ = Describe("Podman trust", func() {
}
Expect(teststruct["default"][0]["type"]).To(Equal("insecureAcceptAnything"))
})
+
+ It("podman image trust show --json", func() {
+ session := podmanTest.Podman([]string{"image", "trust", "show", "--json"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(session.IsJSONOutputValid()).To(BeTrue())
+ var teststruct []map[string]string
+ json.Unmarshal(session.Out.Contents(), &teststruct)
+ Expect(teststruct[0]["name"]).To(Equal("* (default)"))
+ Expect(teststruct[0]["repo_name"]).To(Equal("default"))
+ Expect(teststruct[0]["type"]).To(Equal("accept"))
+ Expect(teststruct[1]["type"]).To(Equal("insecureAcceptAnything"))
+ })
+
+ It("podman image trust show --raw", func() {
+ session := podmanTest.Podman([]string{"image", "trust", "show", "--raw"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(session.IsJSONOutputValid()).To(BeTrue())
+ Expect(session.OutputToString()).To(ContainSubstring("default"))
+ Expect(session.OutputToString()).To(ContainSubstring("insecureAcceptAnything"))
+ })
})