diff options
Diffstat (limited to 'test/e2e')
-rw-r--r-- | test/e2e/inspect_test.go | 45 | ||||
-rw-r--r-- | test/e2e/pod_rm_test.go | 1 | ||||
-rw-r--r-- | test/e2e/pod_stats_test.go | 17 | ||||
-rw-r--r-- | test/e2e/pod_stop_test.go | 2 | ||||
-rw-r--r-- | test/e2e/rm_test.go | 1 | ||||
-rw-r--r-- | test/e2e/stop_test.go | 2 | ||||
-rw-r--r-- | test/e2e/systemd_test.go | 8 |
7 files changed, 62 insertions, 14 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()) diff --git a/test/e2e/systemd_test.go b/test/e2e/systemd_test.go index 1275670eb..a35e5113a 100644 --- a/test/e2e/systemd_test.go +++ b/test/e2e/systemd_test.go @@ -8,7 +8,6 @@ import ( "strings" "time" - "github.com/containers/libpod/pkg/cgroups" . "github.com/containers/libpod/test/utils" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" @@ -82,13 +81,6 @@ WantedBy=multi-user.target }) It("podman run container with systemd PID1", func() { - cgroupsv2, err := cgroups.IsCgroup2UnifiedMode() - Expect(err).To(BeNil()) - if cgroupsv2 { - // TODO: Find a way to enable this for v2 - Skip("systemd test does not work in cgroups V2 mode yet") - } - systemdImage := "fedora" pull := podmanTest.Podman([]string{"pull", systemdImage}) pull.WaitWithDefaultTimeout() |