summaryrefslogtreecommitdiff
path: root/test/e2e/runlabel_test.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2020-09-09 10:43:42 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2020-09-09 10:45:24 -0400
commit1d7d21819138b2b1c7abd732dbf26bca5fc8e951 (patch)
treefc8f9cdb5d8851ed1724e040c7aa0f9246b2ef03 /test/e2e/runlabel_test.go
parent6b1a1fcc5cb92a9fd5800b0d1af44f26093a8153 (diff)
downloadpodman-1d7d21819138b2b1c7abd732dbf26bca5fc8e951.tar.gz
podman-1d7d21819138b2b1c7abd732dbf26bca5fc8e951.tar.bz2
podman-1d7d21819138b2b1c7abd732dbf26bca5fc8e951.zip
Fix podman container runlabel --display
Current podman container runlabel --display is being ignored. This is just supposed to display the command that would be run, and then exit, but instead is actually running the command. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1877186 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'test/e2e/runlabel_test.go')
-rw-r--r--test/e2e/runlabel_test.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/e2e/runlabel_test.go b/test/e2e/runlabel_test.go
index de79b2b98..f17b4d560 100644
--- a/test/e2e/runlabel_test.go
+++ b/test/e2e/runlabel_test.go
@@ -72,6 +72,21 @@ var _ = Describe("podman container runlabel", func() {
result.WaitWithDefaultTimeout()
Expect(result.ExitCode()).To(Equal(0))
})
+
+ It("podman container runlabel --display", func() {
+ SkipIfRemote()
+ image := "podman-runlabel-test:ls"
+ podmanTest.BuildImage(LsDockerfile, image, "false")
+
+ result := podmanTest.Podman([]string{"container", "runlabel", "--display", "RUN", image})
+ result.WaitWithDefaultTimeout()
+ Expect(result.ExitCode()).To(Equal(0))
+ Expect(result.OutputToString()).To(ContainSubstring(podmanTest.PodmanBinary + " -la"))
+
+ result = podmanTest.Podman([]string{"rmi", image})
+ result.WaitWithDefaultTimeout()
+ Expect(result.ExitCode()).To(Equal(0))
+ })
It("podman container runlabel bogus label should result in non-zero exit code", func() {
result := podmanTest.Podman([]string{"container", "runlabel", "RUN", ALPINE})
result.WaitWithDefaultTimeout()