mirror of
https://github.com/containers/podman.git
synced 2025-08-06 03:19:52 +08:00
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:
@ -1,6 +1,7 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
"github.com/containers/storage/pkg/stringid"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
@ -15,7 +16,7 @@ var _ = Describe("Podman run with --mac-address flag", func() {
|
||||
if isRootless() {
|
||||
Expect(result).Should(Exit(125))
|
||||
} else {
|
||||
Expect(result).Should(Exit(0))
|
||||
Expect(result).Should(ExitCleanly())
|
||||
Expect(result.OutputToString()).To(ContainSubstring("92:d0:c6:0a:29:34"))
|
||||
}
|
||||
})
|
||||
@ -25,11 +26,11 @@ var _ = Describe("Podman run with --mac-address flag", func() {
|
||||
session := podmanTest.Podman([]string{"network", "create", net})
|
||||
session.WaitWithDefaultTimeout()
|
||||
defer podmanTest.removeNetwork(net)
|
||||
Expect(session).Should(Exit(0))
|
||||
Expect(session).Should(ExitCleanly())
|
||||
|
||||
result := podmanTest.Podman([]string{"run", "--network", net, "--mac-address", "92:d0:c6:00:29:34", ALPINE, "ip", "addr"})
|
||||
result.WaitWithDefaultTimeout()
|
||||
Expect(result).Should(Exit(0))
|
||||
Expect(result).Should(ExitCleanly())
|
||||
Expect(result.OutputToString()).To(ContainSubstring("92:d0:c6:00:29:34"))
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user