e2e: ExitCleanly(): the final fron^Wcommit

Final push on RUN-1907. Commit 1 of 2.

This is the final set of test/e2e/*_test.go files to be
converted from Exit(0) to ExitCleanly().

This commit is a mix of automated string-replace with
manual revert-back: tests that did not pass with ExitCleanly()
are reverted back to Exit(0), so they will not show up as
diffs in this commit. When possible, I address those in
my next commit.

My goal was to make this commit a don't-bother-reviewing one
that will also pass tests (so as not to break git-bisect).
The next commit is the important one to review.

Signed-off-by: Ed Santiago <santiago@redhat.com>
This commit is contained in:
Ed Santiago
2023-09-27 07:49:20 -06:00
parent b4d66a9396
commit 611db19b31
9 changed files with 159 additions and 158 deletions

View File

@ -7,7 +7,6 @@ import (
. "github.com/containers/podman/v4/test/utils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gexec"
)
var _ = Describe("Podman export", func() {
@ -19,7 +18,7 @@ var _ = Describe("Podman export", func() {
outfile := filepath.Join(podmanTest.TempDir, "container.tar")
result := podmanTest.Podman([]string{"export", "-o", outfile, cid})
result.WaitWithDefaultTimeout()
Expect(result).Should(Exit(0))
Expect(result).Should(ExitCleanly())
_, err := os.Stat(outfile)
Expect(err).ToNot(HaveOccurred())
@ -34,7 +33,7 @@ var _ = Describe("Podman export", func() {
outfile := filepath.Join(podmanTest.TempDir, "container.tar")
result := podmanTest.Podman([]string{"container", "export", "-o", outfile, cid})
result.WaitWithDefaultTimeout()
Expect(result).Should(Exit(0))
Expect(result).Should(ExitCleanly())
_, err := os.Stat(outfile)
Expect(err).ToNot(HaveOccurred())