summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/e2e/exec_test.go4
-rw-r--r--test/e2e/libpod_suite_remoteclient_test.go7
-rw-r--r--test/e2e/libpod_suite_test.go7
-rw-r--r--test/e2e/run_exit_test.go4
-rw-r--r--test/e2e/run_test.go3
-rw-r--r--test/e2e/start_test.go4
6 files changed, 29 insertions, 0 deletions
diff --git a/test/e2e/exec_test.go b/test/e2e/exec_test.go
index 6cf78a25c..3f9639fda 100644
--- a/test/e2e/exec_test.go
+++ b/test/e2e/exec_test.go
@@ -179,6 +179,8 @@ var _ = Describe("Podman exec", func() {
})
It("podman exec cannot be invoked", func() {
+ SkipIfNotRunc()
+
setup := podmanTest.RunTopContainer("test1")
setup.WaitWithDefaultTimeout()
Expect(setup.ExitCode()).To(Equal(0))
@@ -189,6 +191,8 @@ var _ = Describe("Podman exec", func() {
})
It("podman exec command not found", func() {
+ SkipIfNotRunc()
+
setup := podmanTest.RunTopContainer("test1")
setup.WaitWithDefaultTimeout()
Expect(setup.ExitCode()).To(Equal(0))
diff --git a/test/e2e/libpod_suite_remoteclient_test.go b/test/e2e/libpod_suite_remoteclient_test.go
index 7f33fec87..a6cedfc58 100644
--- a/test/e2e/libpod_suite_remoteclient_test.go
+++ b/test/e2e/libpod_suite_remoteclient_test.go
@@ -28,6 +28,13 @@ func SkipIfRootless() {
}
}
+func SkipIfNotRunc() {
+ runtime := os.Getenv("OCI_RUNTIME")
+ if runtime != "" && filepath.Base(runtime) != "runc" {
+ ginkgo.Skip("Not using runc as runtime")
+ }
+}
+
// Podman is the exec call to podman on the filesystem
func (p *PodmanTestIntegration) Podman(args []string) *PodmanSessionIntegration {
podmanSession := p.PodmanBase(args, false, false)
diff --git a/test/e2e/libpod_suite_test.go b/test/e2e/libpod_suite_test.go
index 1df59dbe3..22cc14d6b 100644
--- a/test/e2e/libpod_suite_test.go
+++ b/test/e2e/libpod_suite_test.go
@@ -21,6 +21,13 @@ func SkipIfRootless() {
}
}
+func SkipIfNotRunc() {
+ runtime := os.Getenv("OCI_RUNTIME")
+ if runtime != "" && filepath.Base(runtime) != "runc" {
+ ginkgo.Skip("Not using runc as runtime")
+ }
+}
+
// Podman is the exec call to podman on the filesystem
func (p *PodmanTestIntegration) Podman(args []string) *PodmanSessionIntegration {
podmanSession := p.PodmanBase(args, false, false)
diff --git a/test/e2e/run_exit_test.go b/test/e2e/run_exit_test.go
index 861d6b3b7..b05849ddb 100644
--- a/test/e2e/run_exit_test.go
+++ b/test/e2e/run_exit_test.go
@@ -41,12 +41,16 @@ var _ = Describe("Podman run exit", func() {
})
It("podman run exit 126", func() {
+ SkipIfNotRunc()
+
result := podmanTest.Podman([]string{"run", ALPINE, "/etc"})
result.WaitWithDefaultTimeout()
Expect(result.ExitCode()).To(Equal(126))
})
It("podman run exit 127", func() {
+ SkipIfNotRunc()
+
result := podmanTest.Podman([]string{"run", ALPINE, "foobar"})
result.WaitWithDefaultTimeout()
Expect(result.ExitCode()).To(Equal(127))
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go
index f66d1d2fa..1420a8403 100644
--- a/test/e2e/run_test.go
+++ b/test/e2e/run_test.go
@@ -353,6 +353,8 @@ var _ = Describe("Podman run", func() {
It("podman run notify_socket", func() {
SkipIfRemote()
+ SkipIfNotRunc()
+
host := GetHostDistributionInfo()
if host.Distribution != "rhel" && host.Distribution != "centos" && host.Distribution != "fedora" {
Skip("this test requires a working runc")
@@ -563,6 +565,7 @@ var _ = Describe("Podman run", func() {
})
It("podman run exit code on failure to exec", func() {
+ SkipIfNotRunc()
session := podmanTest.Podman([]string{"run", ALPINE, "/etc"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(126))
diff --git a/test/e2e/start_test.go b/test/e2e/start_test.go
index fc1203ed1..2dbb9545b 100644
--- a/test/e2e/start_test.go
+++ b/test/e2e/start_test.go
@@ -101,6 +101,8 @@ var _ = Describe("Podman start", func() {
})
It("podman failed to start with --rm should delete the container", func() {
+ SkipIfNotRunc()
+
session := podmanTest.Podman([]string{"create", "-it", "--rm", ALPINE, "foo"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))
@@ -114,6 +116,8 @@ var _ = Describe("Podman start", func() {
})
It("podman failed to start without --rm should NOT delete the container", func() {
+ SkipIfNotRunc()
+
session := podmanTest.Podman([]string{"create", "-it", ALPINE, "foo"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0))