summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/checkpoint_test.go3
-rw-r--r--test/e2e/containers_conf_test.go17
-rw-r--r--test/e2e/cp_test.go3
-rw-r--r--test/e2e/image_sign_test.go3
-rw-r--r--test/e2e/import_test.go3
-rw-r--r--test/e2e/mount_rootless_test.go7
-rw-r--r--test/e2e/pod_ps_test.go26
7 files changed, 45 insertions, 17 deletions
diff --git a/test/e2e/checkpoint_test.go b/test/e2e/checkpoint_test.go
index f22a4c3af..75310b961 100644
--- a/test/e2e/checkpoint_test.go
+++ b/test/e2e/checkpoint_test.go
@@ -1,5 +1,3 @@
-// +build !remote
-
package integration
import (
@@ -27,6 +25,7 @@ var _ = Describe("Podman checkpoint", func() {
)
BeforeEach(func() {
+ SkipIfRemote("checkpoint not supported in remote mode")
SkipIfRootless("checkpoint not supported in rootless mode")
tempdir, err = CreateTempDirInTempDir()
if err != nil {
diff --git a/test/e2e/containers_conf_test.go b/test/e2e/containers_conf_test.go
index 965e51973..1d5be218b 100644
--- a/test/e2e/containers_conf_test.go
+++ b/test/e2e/containers_conf_test.go
@@ -1,5 +1,3 @@
-// +build !remote
-
package integration
import (
@@ -31,6 +29,10 @@ var _ = Describe("Podman run", func() {
podmanTest.Setup()
podmanTest.SeedImages()
os.Setenv("CONTAINERS_CONF", "config/containers.conf")
+ if IsRemote() {
+ podmanTest.RestartRemoteService()
+ }
+
})
AfterEach(func() {
@@ -80,12 +82,14 @@ var _ = Describe("Podman run", func() {
})
It("podman Capabilities in containers.conf", func() {
- os.Setenv("CONTAINERS_CONF", "config/containers.conf")
cap := podmanTest.Podman([]string{"run", ALPINE, "grep", "CapEff", "/proc/self/status"})
cap.WaitWithDefaultTimeout()
Expect(cap.ExitCode()).To(Equal(0))
os.Setenv("CONTAINERS_CONF", "config/containers-ns.conf")
+ if IsRemote() {
+ podmanTest.RestartRemoteService()
+ }
session := podmanTest.Podman([]string{"run", "busybox", "grep", "CapEff", "/proc/self/status"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
@@ -93,7 +97,6 @@ var _ = Describe("Podman run", func() {
})
It("podman Regular capabilities", func() {
- os.Setenv("CONTAINERS_CONF", "config/containers.conf")
setup := podmanTest.RunTopContainer("test1")
setup.WaitWithDefaultTimeout()
result := podmanTest.Podman([]string{"top", "test1", "capeff"})
@@ -105,6 +108,9 @@ var _ = Describe("Podman run", func() {
It("podman drop capabilities", func() {
os.Setenv("CONTAINERS_CONF", "config/containers-caps.conf")
+ if IsRemote() {
+ podmanTest.RestartRemoteService()
+ }
setup := podmanTest.RunTopContainer("test1")
setup.WaitWithDefaultTimeout()
result := podmanTest.Podman([]string{"container", "top", "test1", "capeff"})
@@ -116,6 +122,9 @@ var _ = Describe("Podman run", func() {
verifyNSHandling := func(nspath, option string) {
os.Setenv("CONTAINERS_CONF", "config/containers-ns.conf")
+ if IsRemote() {
+ podmanTest.RestartRemoteService()
+ }
//containers.conf default ipcns to default to host
session := podmanTest.Podman([]string{"run", ALPINE, "ls", "-l", nspath})
session.WaitWithDefaultTimeout()
diff --git a/test/e2e/cp_test.go b/test/e2e/cp_test.go
index b2d55ec1a..c1d3be5ab 100644
--- a/test/e2e/cp_test.go
+++ b/test/e2e/cp_test.go
@@ -1,5 +1,3 @@
-// +build !remote
-
package integration
import (
@@ -22,6 +20,7 @@ var _ = Describe("Podman cp", func() {
)
BeforeEach(func() {
+ SkipIfRemote("FIXME: Podman-remote cp needs to work")
tempdir, err = CreateTempDirInTempDir()
if err != nil {
os.Exit(1)
diff --git a/test/e2e/image_sign_test.go b/test/e2e/image_sign_test.go
index c54cf433d..c9041eaba 100644
--- a/test/e2e/image_sign_test.go
+++ b/test/e2e/image_sign_test.go
@@ -1,5 +1,3 @@
-// +build !remote
-
package integration
import (
@@ -21,6 +19,7 @@ var _ = Describe("Podman image sign", func() {
)
BeforeEach(func() {
+ SkipIfRemote("podman-remote image sign is not supported")
tempdir, err = CreateTempDirInTempDir()
if err != nil {
os.Exit(1)
diff --git a/test/e2e/import_test.go b/test/e2e/import_test.go
index 35fe0980a..1be4ef920 100644
--- a/test/e2e/import_test.go
+++ b/test/e2e/import_test.go
@@ -1,5 +1,3 @@
-// +build !remote
-
package integration
import (
@@ -19,6 +17,7 @@ var _ = Describe("Podman import", func() {
)
BeforeEach(func() {
+ SkipIfRemote("FIXME: These look like it is supposed to work in remote")
tempdir, err = CreateTempDirInTempDir()
if err != nil {
os.Exit(1)
diff --git a/test/e2e/mount_rootless_test.go b/test/e2e/mount_rootless_test.go
index 063dcb631..1e4152709 100644
--- a/test/e2e/mount_rootless_test.go
+++ b/test/e2e/mount_rootless_test.go
@@ -1,5 +1,3 @@
-// +build !remote
-
package integration
import (
@@ -18,9 +16,8 @@ var _ = Describe("Podman mount", func() {
)
BeforeEach(func() {
- if os.Geteuid() == 0 {
- Skip("This function is not enabled for rootfull podman")
- }
+ SkipIfNotRootless("This function is not enabled for rootfull podman")
+ SkipIfRemote("Podman mount not supported for remote connections")
tempdir, err = CreateTempDirInTempDir()
if err != nil {
os.Exit(1)
diff --git a/test/e2e/pod_ps_test.go b/test/e2e/pod_ps_test.go
index 5d63d5985..ea8d10e78 100644
--- a/test/e2e/pod_ps_test.go
+++ b/test/e2e/pod_ps_test.go
@@ -194,12 +194,24 @@ var _ = Describe("Podman ps", func() {
Expect(session.OutputToString()).To(ContainSubstring(podid1))
Expect(session.OutputToString()).To(Not(ContainSubstring(podid2)))
+ session = podmanTest.Podman([]string{"pod", "ps", "-q", "--no-trunc", "--filter", "ctr-names=test", "--filter", "ctr-status=running"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(session.OutputToString()).To(ContainSubstring(podid1))
+ Expect(session.OutputToString()).To(Not(ContainSubstring(podid2)))
+
session = podmanTest.Podman([]string{"pod", "ps", "-q", "--no-trunc", "--filter", fmt.Sprintf("ctr-ids=%s", cid)})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
Expect(session.OutputToString()).To(ContainSubstring(podid2))
Expect(session.OutputToString()).To(Not(ContainSubstring(podid1)))
+ session = podmanTest.Podman([]string{"pod", "ps", "-q", "--no-trunc", "--filter", "ctr-ids=" + cid[:40], "--filter", "ctr-ids=" + cid + "$"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(session.OutputToString()).To(ContainSubstring(podid2))
+ Expect(session.OutputToString()).To(Not(ContainSubstring(podid1)))
+
_, ec3, podid3 := podmanTest.CreatePod("")
Expect(ec3).To(Equal(0))
@@ -210,6 +222,13 @@ var _ = Describe("Podman ps", func() {
Expect(session.OutputToString()).To(ContainSubstring(podid2))
Expect(session.OutputToString()).To(Not(ContainSubstring(podid3)))
+ session = podmanTest.Podman([]string{"pod", "ps", "-q", "--no-trunc", "--filter", "ctr-number=1", "--filter", "ctr-number=0"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(session.OutputToString()).To(ContainSubstring(podid1))
+ Expect(session.OutputToString()).To(ContainSubstring(podid2))
+ Expect(session.OutputToString()).To(ContainSubstring(podid3))
+
session = podmanTest.Podman([]string{"pod", "ps", "-q", "--no-trunc", "--filter", "ctr-status=running"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
@@ -224,6 +243,13 @@ var _ = Describe("Podman ps", func() {
Expect(session.OutputToString()).To(Not(ContainSubstring(podid1)))
Expect(session.OutputToString()).To(Not(ContainSubstring(podid3)))
+ session = podmanTest.Podman([]string{"pod", "ps", "-q", "--no-trunc", "--filter", "ctr-status=exited", "--filter", "ctr-status=running"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(session.OutputToString()).To(ContainSubstring(podid1))
+ Expect(session.OutputToString()).To(ContainSubstring(podid2))
+ Expect(session.OutputToString()).To(Not(ContainSubstring(podid3)))
+
session = podmanTest.Podman([]string{"pod", "ps", "-q", "--no-trunc", "--filter", "ctr-status=created"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))