From 97fec292123939d2cb505c26c327726163ff1867 Mon Sep 17 00:00:00 2001 From: zhangguanzhang Date: Fri, 16 Oct 2020 11:05:44 +0800 Subject: Fix panic when runlabel is missing Signed-off-by: zhangguanzhang --- test/e2e/runlabel_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'test/e2e/runlabel_test.go') 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() { -- cgit v1.2.3-54-g00ecf