summaryrefslogtreecommitdiff
path: root/test/e2e/pod_create_test.go
diff options
context:
space:
mode:
authorzhangguanzhang <zhangguanzhang@qq.com>2020-09-18 00:20:11 +0800
committerzhangguanzhang <zhangguanzhang@qq.com>2020-09-18 09:57:54 +0800
commit5f6fff0899ef3962af8ad41e6dc3c564520557dd (patch)
treea97d1879ddcca4c458da447d1886182325b333c7 /test/e2e/pod_create_test.go
parentf84f441bec8d4ad6b6dfce059ca71dbd2b0d9615 (diff)
downloadpodman-5f6fff0899ef3962af8ad41e6dc3c564520557dd.tar.gz
podman-5f6fff0899ef3962af8ad41e6dc3c564520557dd.tar.bz2
podman-5f6fff0899ef3962af8ad41e6dc3c564520557dd.zip
fix the .Path and .Args when use the infra-command
Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
Diffstat (limited to 'test/e2e/pod_create_test.go')
-rw-r--r--test/e2e/pod_create_test.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/e2e/pod_create_test.go b/test/e2e/pod_create_test.go
index ed62e8a4b..168150bff 100644
--- a/test/e2e/pod_create_test.go
+++ b/test/e2e/pod_create_test.go
@@ -345,6 +345,12 @@ var _ = Describe("Podman pod create", func() {
check1.WaitWithDefaultTimeout()
Expect(check1.ExitCode()).To(Equal(0))
Expect(check1.OutputToString()).To(Equal("/pause"))
+
+ // check the Path and Args
+ check2 := podmanTest.Podman([]string{"container", "inspect", "--format", "{{.Path}}:{{.Args}}", data.Containers[0].ID})
+ check2.WaitWithDefaultTimeout()
+ Expect(check2.ExitCode()).To(Equal(0))
+ Expect(check2.OutputToString()).To(Equal("/pause:[/pause]"))
})
It("podman create pod with --infra-command", func() {
@@ -362,6 +368,12 @@ var _ = Describe("Podman pod create", func() {
check1.WaitWithDefaultTimeout()
Expect(check1.ExitCode()).To(Equal(0))
Expect(check1.OutputToString()).To(Equal("/pause1"))
+
+ // check the Path and Args
+ check2 := podmanTest.Podman([]string{"container", "inspect", "--format", "{{.Path}}:{{.Args}}", data.Containers[0].ID})
+ check2.WaitWithDefaultTimeout()
+ Expect(check2.ExitCode()).To(Equal(0))
+ Expect(check2.OutputToString()).To(Equal("/pause1:[/pause1]"))
})
It("podman create pod with --infra-image", func() {
@@ -383,6 +395,12 @@ entrypoint ["/fromimage"]
check1.WaitWithDefaultTimeout()
Expect(check1.ExitCode()).To(Equal(0))
Expect(check1.OutputToString()).To(Equal("/fromimage"))
+
+ // check the Path and Args
+ check2 := podmanTest.Podman([]string{"container", "inspect", "--format", "{{.Path}}:{{.Args}}", data.Containers[0].ID})
+ check2.WaitWithDefaultTimeout()
+ Expect(check2.ExitCode()).To(Equal(0))
+ Expect(check2.OutputToString()).To(Equal("/fromimage:[/fromimage]"))
})
It("podman create pod with --infra-command --infra-image", func() {
@@ -404,5 +422,11 @@ entrypoint ["/fromimage"]
check1.WaitWithDefaultTimeout()
Expect(check1.ExitCode()).To(Equal(0))
Expect(check1.OutputToString()).To(Equal("/fromcommand"))
+
+ // check the Path and Args
+ check2 := podmanTest.Podman([]string{"container", "inspect", "--format", "{{.Path}}:{{.Args}}", data.Containers[0].ID})
+ check2.WaitWithDefaultTimeout()
+ Expect(check2.ExitCode()).To(Equal(0))
+ Expect(check2.OutputToString()).To(Equal("/fromcommand:[/fromcommand]"))
})
})