summaryrefslogtreecommitdiff
path: root/cmd/podman/shared/funcs_test.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2018-10-05 11:19:48 -0700
committerGitHub <noreply@github.com>2018-10-05 11:19:48 -0700
commit260357cf8b8ddb8b85781a753b952b3392873c09 (patch)
tree77a1be42f9f4b77f6d91e712ab4e7fe5ff321bbc /cmd/podman/shared/funcs_test.go
parent550270364bb533f29742534ff31e15cbf54c57da (diff)
parentd4eca12cc12734f2b578e1b1967d69889c21c487 (diff)
downloadpodman-260357cf8b8ddb8b85781a753b952b3392873c09.tar.gz
podman-260357cf8b8ddb8b85781a753b952b3392873c09.tar.bz2
podman-260357cf8b8ddb8b85781a753b952b3392873c09.zip
Merge pull request #1594 from vrothberg/runlabel
runlabel: execute /proc/self/exe and avoid recursion
Diffstat (limited to 'cmd/podman/shared/funcs_test.go')
-rw-r--r--cmd/podman/shared/funcs_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd/podman/shared/funcs_test.go b/cmd/podman/shared/funcs_test.go
index 3d0ac005f..612be480b 100644
--- a/cmd/podman/shared/funcs_test.go
+++ b/cmd/podman/shared/funcs_test.go
@@ -15,35 +15,35 @@ var (
func TestGenerateCommand(t *testing.T) {
inputCommand := "docker run -it --name NAME -e NAME=NAME -e IMAGE=IMAGE IMAGE echo install"
- correctCommand := "podman run -it --name bar -e NAME=bar -e IMAGE=foo foo echo install"
+ correctCommand := "/proc/self/exe run -it --name bar -e NAME=bar -e IMAGE=foo foo echo install"
newCommand := GenerateCommand(inputCommand, "foo", "bar")
assert.Equal(t, correctCommand, strings.Join(newCommand, " "))
}
func TestGenerateCommandPath(t *testing.T) {
inputCommand := "/usr/bin/docker run -it --name NAME -e NAME=NAME -e IMAGE=IMAGE IMAGE echo install"
- correctCommand := "podman run -it --name bar -e NAME=bar -e IMAGE=foo foo echo install"
+ correctCommand := "/proc/self/exe run -it --name bar -e NAME=bar -e IMAGE=foo foo echo install"
newCommand := GenerateCommand(inputCommand, "foo", "bar")
assert.Equal(t, correctCommand, strings.Join(newCommand, " "))
}
func TestGenerateCommandNoSetName(t *testing.T) {
inputCommand := "docker run -it --name NAME -e NAME=NAME -e IMAGE=IMAGE IMAGE echo install"
- correctCommand := "podman run -it --name foo -e NAME=foo -e IMAGE=foo foo echo install"
+ correctCommand := "/proc/self/exe run -it --name foo -e NAME=foo -e IMAGE=foo foo echo install"
newCommand := GenerateCommand(inputCommand, "foo", "")
assert.Equal(t, correctCommand, strings.Join(newCommand, " "))
}
func TestGenerateCommandNoName(t *testing.T) {
inputCommand := "docker run -it -e IMAGE=IMAGE IMAGE echo install"
- correctCommand := "podman run -it -e IMAGE=foo foo echo install"
+ correctCommand := "/proc/self/exe run -it -e IMAGE=foo foo echo install"
newCommand := GenerateCommand(inputCommand, "foo", "")
assert.Equal(t, correctCommand, strings.Join(newCommand, " "))
}
func TestGenerateCommandAlreadyPodman(t *testing.T) {
inputCommand := "podman run -it --name NAME -e NAME=NAME -e IMAGE=IMAGE IMAGE echo install"
- correctCommand := "podman run -it --name bar -e NAME=bar -e IMAGE=foo foo echo install"
+ correctCommand := "/proc/self/exe run -it --name bar -e NAME=bar -e IMAGE=foo foo echo install"
newCommand := GenerateCommand(inputCommand, "foo", "bar")
assert.Equal(t, correctCommand, strings.Join(newCommand, " "))
}