summaryrefslogtreecommitdiff
path: root/test/e2e/pod_inspect_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/e2e/pod_inspect_test.go')
-rw-r--r--test/e2e/pod_inspect_test.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/e2e/pod_inspect_test.go b/test/e2e/pod_inspect_test.go
index 8040adf1e..f1acd3750 100644
--- a/test/e2e/pod_inspect_test.go
+++ b/test/e2e/pod_inspect_test.go
@@ -57,4 +57,26 @@ var _ = Describe("Podman pod inspect", func() {
podData := inspect.InspectPodToJSON()
Expect(podData.ID).To(Equal(podid))
})
+
+ It("podman pod inspect (CreateCommand)", func() {
+ podName := "myTestPod"
+ createCommand := []string{"pod", "create", "--name", podName, "--hostname", "rudolph", "--share", "net"}
+
+ // Create the pod.
+ session := podmanTest.Podman(createCommand)
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+
+ // Inspect the pod and make sure that the create command is
+ // exactly how we created the pod.
+ inspect := podmanTest.Podman([]string{"pod", "inspect", podName})
+ inspect.WaitWithDefaultTimeout()
+ Expect(inspect.ExitCode()).To(Equal(0))
+ Expect(inspect.IsJSONOutputValid()).To(BeTrue())
+ podData := inspect.InspectPodToJSON()
+ // Let's get the last len(createCommand) items in the command.
+ inspectCreateCommand := podData.CreateCommand
+ index := len(inspectCreateCommand) - len(createCommand)
+ Expect(inspectCreateCommand[index:]).To(Equal(createCommand))
+ })
})