diff options
author | zhangguanzhang <zhangguanzhang@qq.com> | 2020-10-16 11:05:44 +0800 |
---|---|---|
committer | zhangguanzhang <zhangguanzhang@qq.com> | 2020-10-16 11:09:21 +0800 |
commit | 97fec292123939d2cb505c26c327726163ff1867 (patch) | |
tree | f0fa6f0017af8982791ad8d5c1773d5f0e234f52 /test/e2e/runlabel_test.go | |
parent | c3ecdd09ed6a9b17da9879d7f2765a6f5f3ace8a (diff) | |
download | podman-97fec292123939d2cb505c26c327726163ff1867.tar.gz podman-97fec292123939d2cb505c26c327726163ff1867.tar.bz2 podman-97fec292123939d2cb505c26c327726163ff1867.zip |
Fix panic when runlabel is missing
Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
Diffstat (limited to 'test/e2e/runlabel_test.go')
-rw-r--r-- | test/e2e/runlabel_test.go | 5 |
1 files changed, 4 insertions, 1 deletions
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() { |