summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-09-15 15:03:58 -0400
committerGitHub <noreply@github.com>2021-09-15 15:03:58 -0400
commitf38503a1a3336a87a950c1d97bf1cb9a1a883ada (patch)
treeacbc335c68dcd6a7a2f0de5700e51f017e94348c /test
parentf9d8301c476fcd8498930c518f04920e9e8eeac5 (diff)
parent0b1c45bc542636d48abcc3980baa02b9a65f57a9 (diff)
downloadpodman-f38503a1a3336a87a950c1d97bf1cb9a1a883ada.tar.gz
podman-f38503a1a3336a87a950c1d97bf1cb9a1a883ada.tar.bz2
podman-f38503a1a3336a87a950c1d97bf1cb9a1a883ada.zip
Merge pull request #11592 from Luap99/runlabel-name
container runlabel remove image tag from name
Diffstat (limited to 'test')
-rw-r--r--test/e2e/runlabel_test.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/e2e/runlabel_test.go b/test/e2e/runlabel_test.go
index e67b6cba1..656eaaceb 100644
--- a/test/e2e/runlabel_test.go
+++ b/test/e2e/runlabel_test.go
@@ -22,6 +22,10 @@ var GlobalDockerfile = fmt.Sprintf(`
FROM %s
LABEL RUN echo \$GLOBAL_OPTS`, ALPINE)
+var PodmanRunlabelNameDockerfile = fmt.Sprintf(`
+FROM %s
+LABEL RUN podman run --name NAME IMAGE`, ALPINE)
+
var _ = Describe("podman container runlabel", func() {
var (
tempdir string
@@ -128,4 +132,18 @@ var _ = Describe("podman container runlabel", func() {
result.WaitWithDefaultTimeout()
Expect(result).Should(Exit(0))
})
+
+ It("podman container runlabel name removes tag from image", func() {
+ image := "podman-runlabel-name:sometag"
+ podmanTest.BuildImage(PodmanRunlabelNameDockerfile, image, "false")
+
+ result := podmanTest.Podman([]string{"container", "runlabel", "--display", "RUN", image})
+ result.WaitWithDefaultTimeout()
+ Expect(result).Should(Exit(0))
+ Expect(result.OutputToString()).To(Equal("command: " + podmanTest.PodmanBinary + " run --name podman-runlabel-name localhost/" + image))
+
+ result = podmanTest.Podman([]string{"rmi", image})
+ result.WaitWithDefaultTimeout()
+ Expect(result).Should(Exit(0))
+ })
})