mirror of
https://github.com/containers/podman.git
synced 2025-06-21 01:19:15 +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() {
|
It("podman exec cannot be invoked", func() {
|
||||||
|
SkipIfNotRunc()
|
||||||
|
|
||||||
setup := podmanTest.RunTopContainer("test1")
|
setup := podmanTest.RunTopContainer("test1")
|
||||||
setup.WaitWithDefaultTimeout()
|
setup.WaitWithDefaultTimeout()
|
||||||
Expect(setup.ExitCode()).To(Equal(0))
|
Expect(setup.ExitCode()).To(Equal(0))
|
||||||
@ -189,6 +191,8 @@ var _ = Describe("Podman exec", func() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
It("podman exec command not found", func() {
|
It("podman exec command not found", func() {
|
||||||
|
SkipIfNotRunc()
|
||||||
|
|
||||||
setup := podmanTest.RunTopContainer("test1")
|
setup := podmanTest.RunTopContainer("test1")
|
||||||
setup.WaitWithDefaultTimeout()
|
setup.WaitWithDefaultTimeout()
|
||||||
Expect(setup.ExitCode()).To(Equal(0))
|
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
|
// Podman is the exec call to podman on the filesystem
|
||||||
func (p *PodmanTestIntegration) Podman(args []string) *PodmanSessionIntegration {
|
func (p *PodmanTestIntegration) Podman(args []string) *PodmanSessionIntegration {
|
||||||
podmanSession := p.PodmanBase(args, false, false)
|
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
|
// Podman is the exec call to podman on the filesystem
|
||||||
func (p *PodmanTestIntegration) Podman(args []string) *PodmanSessionIntegration {
|
func (p *PodmanTestIntegration) Podman(args []string) *PodmanSessionIntegration {
|
||||||
podmanSession := p.PodmanBase(args, false, false)
|
podmanSession := p.PodmanBase(args, false, false)
|
||||||
|
@ -41,12 +41,16 @@ var _ = Describe("Podman run exit", func() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
It("podman run exit 126", func() {
|
It("podman run exit 126", func() {
|
||||||
|
SkipIfNotRunc()
|
||||||
|
|
||||||
result := podmanTest.Podman([]string{"run", ALPINE, "/etc"})
|
result := podmanTest.Podman([]string{"run", ALPINE, "/etc"})
|
||||||
result.WaitWithDefaultTimeout()
|
result.WaitWithDefaultTimeout()
|
||||||
Expect(result.ExitCode()).To(Equal(126))
|
Expect(result.ExitCode()).To(Equal(126))
|
||||||
})
|
})
|
||||||
|
|
||||||
It("podman run exit 127", func() {
|
It("podman run exit 127", func() {
|
||||||
|
SkipIfNotRunc()
|
||||||
|
|
||||||
result := podmanTest.Podman([]string{"run", ALPINE, "foobar"})
|
result := podmanTest.Podman([]string{"run", ALPINE, "foobar"})
|
||||||
result.WaitWithDefaultTimeout()
|
result.WaitWithDefaultTimeout()
|
||||||
Expect(result.ExitCode()).To(Equal(127))
|
Expect(result.ExitCode()).To(Equal(127))
|
||||||
|
@ -353,6 +353,8 @@ var _ = Describe("Podman run", func() {
|
|||||||
|
|
||||||
It("podman run notify_socket", func() {
|
It("podman run notify_socket", func() {
|
||||||
SkipIfRemote()
|
SkipIfRemote()
|
||||||
|
SkipIfNotRunc()
|
||||||
|
|
||||||
host := GetHostDistributionInfo()
|
host := GetHostDistributionInfo()
|
||||||
if host.Distribution != "rhel" && host.Distribution != "centos" && host.Distribution != "fedora" {
|
if host.Distribution != "rhel" && host.Distribution != "centos" && host.Distribution != "fedora" {
|
||||||
Skip("this test requires a working runc")
|
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() {
|
It("podman run exit code on failure to exec", func() {
|
||||||
|
SkipIfNotRunc()
|
||||||
session := podmanTest.Podman([]string{"run", ALPINE, "/etc"})
|
session := podmanTest.Podman([]string{"run", ALPINE, "/etc"})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session.ExitCode()).To(Equal(126))
|
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() {
|
It("podman failed to start with --rm should delete the container", func() {
|
||||||
|
SkipIfNotRunc()
|
||||||
|
|
||||||
session := podmanTest.Podman([]string{"create", "-it", "--rm", ALPINE, "foo"})
|
session := podmanTest.Podman([]string{"create", "-it", "--rm", ALPINE, "foo"})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session.ExitCode()).To(Equal(0))
|
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() {
|
It("podman failed to start without --rm should NOT delete the container", func() {
|
||||||
|
SkipIfNotRunc()
|
||||||
|
|
||||||
session := podmanTest.Podman([]string{"create", "-it", ALPINE, "foo"})
|
session := podmanTest.Podman([]string{"create", "-it", ALPINE, "foo"})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session.ExitCode()).To(Equal(0))
|
Expect(session.ExitCode()).To(Equal(0))
|
||||||
|
Reference in New Issue
Block a user