mirror of
https://github.com/containers/podman.git
synced 2025-06-20 17:13:43 +08:00
tests: disable some tests currently failing when not using runc
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
@ -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))
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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))
|
||||
|
@ -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))
|
||||
|
@ -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))
|
||||
|
Reference in New Issue
Block a user