e2e: more ExitCleanly(): low-hanging fruit

Ongoing steps toward RUN-1907: replace Exit(0) with ExitCleanly()

A handful of test files with trivial command-line replacement,
and no manual muckery (aside from includes).

Signed-off-by: Ed Santiago <santiago@redhat.com>
This commit is contained in:
Ed Santiago
2023-09-12 06:21:00 -06:00
parent 7da91addc8
commit eefaa512af
6 changed files with 99 additions and 99 deletions

View File

@@ -3,9 +3,9 @@ package integration
import (
"github.com/containers/podman/v4/libpod/define"
"github.com/containers/podman/v4/pkg/annotations"
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
var _ = Describe("Podman container inspect", func() {
@@ -14,7 +14,7 @@ var _ = Describe("Podman container inspect", func() {
const testContainer = "container-inspect-test-1"
setup := podmanTest.RunTopContainer(testContainer)
setup.WaitWithDefaultTimeout()
Expect(setup).Should(Exit(0))
Expect(setup).Should(ExitCleanly())
data := podmanTest.InspectContainer(testContainer)
Expect(data[0].Config.Annotations[annotations.ContainerManager]).
@@ -25,7 +25,7 @@ var _ = Describe("Podman container inspect", func() {
name := "testcon"
session := podmanTest.Podman([]string{"run", "-d", "--stop-timeout", "0", "--expose", "8787/udp", "--name", name, ALPINE, "sleep", "inf"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
Expect(session).Should(ExitCleanly())
data := podmanTest.InspectContainer(name)
Expect(data).To(HaveLen(1))
@@ -37,7 +37,7 @@ var _ = Describe("Podman container inspect", func() {
name := "testcon"
session := podmanTest.Podman([]string{"run", "-d", "--expose", "8989", "--name", name, NGINX_IMAGE})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
Expect(session).Should(ExitCleanly())
data := podmanTest.InspectContainer(name)
Expect(data).To(HaveLen(1))