summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/e2e/inspect_test.go45
-rw-r--r--test/e2e/pod_rm_test.go1
-rw-r--r--test/e2e/pod_stats_test.go17
-rw-r--r--test/e2e/pod_stop_test.go2
-rw-r--r--test/e2e/rm_test.go1
-rw-r--r--test/e2e/stop_test.go2
6 files changed, 62 insertions, 6 deletions
diff --git a/test/e2e/inspect_test.go b/test/e2e/inspect_test.go
index 342b3d69f..62f69f1c1 100644
--- a/test/e2e/inspect_test.go
+++ b/test/e2e/inspect_test.go
@@ -178,4 +178,49 @@ var _ = Describe("Podman inspect", func() {
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Not(Equal(0)))
})
+
+ It("podman [image,container] inspect on image", func() {
+ baseInspect := podmanTest.Podman([]string{"inspect", ALPINE})
+ baseInspect.WaitWithDefaultTimeout()
+ Expect(baseInspect.ExitCode()).To(Equal(0))
+ baseJSON := baseInspect.InspectImageJSON()
+ Expect(len(baseJSON)).To(Equal(1))
+
+ ctrInspect := podmanTest.Podman([]string{"container", "inspect", ALPINE})
+ ctrInspect.WaitWithDefaultTimeout()
+ Expect(ctrInspect.ExitCode()).To(Not(Equal(0)))
+
+ imageInspect := podmanTest.Podman([]string{"image", "inspect", ALPINE})
+ imageInspect.WaitWithDefaultTimeout()
+ Expect(imageInspect.ExitCode()).To(Equal(0))
+ imageJSON := imageInspect.InspectImageJSON()
+ Expect(len(imageJSON)).To(Equal(1))
+
+ Expect(baseJSON[0].ID).To(Equal(imageJSON[0].ID))
+ })
+
+ It("podman [image, container] inspect on container", func() {
+ ctrName := "testCtr"
+ create := podmanTest.Podman([]string{"create", "--name", ctrName, ALPINE, "sh"})
+ create.WaitWithDefaultTimeout()
+ Expect(create.ExitCode()).To(Equal(0))
+
+ baseInspect := podmanTest.Podman([]string{"inspect", ctrName})
+ baseInspect.WaitWithDefaultTimeout()
+ Expect(baseInspect.ExitCode()).To(Equal(0))
+ baseJSON := baseInspect.InspectContainerToJSON()
+ Expect(len(baseJSON)).To(Equal(1))
+
+ ctrInspect := podmanTest.Podman([]string{"container", "inspect", ctrName})
+ ctrInspect.WaitWithDefaultTimeout()
+ Expect(ctrInspect.ExitCode()).To(Equal(0))
+ ctrJSON := ctrInspect.InspectContainerToJSON()
+ Expect(len(ctrJSON)).To(Equal(1))
+
+ imageInspect := podmanTest.Podman([]string{"image", "inspect", ctrName})
+ imageInspect.WaitWithDefaultTimeout()
+ Expect(imageInspect.ExitCode()).To(Not(Equal(0)))
+
+ Expect(baseJSON[0].ID).To(Equal(ctrJSON[0].ID))
+ })
})
diff --git a/test/e2e/pod_rm_test.go b/test/e2e/pod_rm_test.go
index e10b3c98f..4060e1268 100644
--- a/test/e2e/pod_rm_test.go
+++ b/test/e2e/pod_rm_test.go
@@ -213,7 +213,6 @@ var _ = Describe("Podman pod rm", func() {
})
It("podman rm --ignore bogus pod and a running pod", func() {
- SkipIfRemote()
_, ec, podid1 := podmanTest.CreatePod("")
Expect(ec).To(Equal(0))
diff --git a/test/e2e/pod_stats_test.go b/test/e2e/pod_stats_test.go
index 9bba59073..778b44d1e 100644
--- a/test/e2e/pod_stats_test.go
+++ b/test/e2e/pod_stats_test.go
@@ -178,4 +178,21 @@ var _ = Describe("Podman pod stats", func() {
Expect(stats).To(ExitWithError())
})
+ It("podman stats on net=host post", func() {
+ // --net=host not supported for rootless pods at present
+ SkipIfRootless()
+ podName := "testPod"
+ podCreate := podmanTest.Podman([]string{"pod", "create", "--net=host", "--name", podName})
+ podCreate.WaitWithDefaultTimeout()
+ Expect(podCreate.ExitCode()).To(Equal(0))
+
+ ctrRun := podmanTest.Podman([]string{"run", "-d", "--pod", podName, ALPINE, "top"})
+ ctrRun.WaitWithDefaultTimeout()
+ Expect(ctrRun.ExitCode()).To(Equal(0))
+
+ stats := podmanTest.Podman([]string{"pod", "stats", "--format", "json", "--no-stream", podName})
+ stats.WaitWithDefaultTimeout()
+ Expect(stats.ExitCode()).To(Equal(0))
+ Expect(stats.IsJSONOutputValid()).To(BeTrue())
+ })
})
diff --git a/test/e2e/pod_stop_test.go b/test/e2e/pod_stop_test.go
index 298f3da2f..0a46b07c9 100644
--- a/test/e2e/pod_stop_test.go
+++ b/test/e2e/pod_stop_test.go
@@ -39,7 +39,6 @@ var _ = Describe("Podman pod stop", func() {
})
It("podman pod stop --ignore bogus pod", func() {
- SkipIfRemote()
session := podmanTest.Podman([]string{"pod", "stop", "--ignore", "123"})
session.WaitWithDefaultTimeout()
@@ -60,7 +59,6 @@ var _ = Describe("Podman pod stop", func() {
})
It("podman stop --ignore bogus pod and a running pod", func() {
- SkipIfRemote()
_, ec, podid1 := podmanTest.CreatePod("")
Expect(ec).To(Equal(0))
diff --git a/test/e2e/rm_test.go b/test/e2e/rm_test.go
index 6b554cd84..d0dbd527a 100644
--- a/test/e2e/rm_test.go
+++ b/test/e2e/rm_test.go
@@ -233,7 +233,6 @@ var _ = Describe("Podman rm", func() {
})
It("podman rm --ignore bogus container and a running container", func() {
- SkipIfRemote()
session := podmanTest.RunTopContainer("test1")
session.WaitWithDefaultTimeout()
diff --git a/test/e2e/stop_test.go b/test/e2e/stop_test.go
index cd78a54e1..4ed0b6293 100644
--- a/test/e2e/stop_test.go
+++ b/test/e2e/stop_test.go
@@ -233,7 +233,6 @@ var _ = Describe("Podman stop", func() {
})
It("podman stop --cidfile", func() {
- SkipIfRemote()
tmpDir, err := ioutil.TempDir("", "")
Expect(err).To(BeNil())
@@ -258,7 +257,6 @@ var _ = Describe("Podman stop", func() {
})
It("podman stop multiple --cidfile", func() {
- SkipIfRemote()
tmpDir, err := ioutil.TempDir("", "")
Expect(err).To(BeNil())