diff options
author | Ed Santiago <santiago@redhat.com> | 2021-11-30 10:00:17 -0700 |
---|---|---|
committer | Ed Santiago <santiago@redhat.com> | 2021-11-30 10:13:16 -0700 |
commit | 8eb0be0a29a647308b3ed9eab2126e1004b6ba85 (patch) | |
tree | d1e806225b1f1fe93feac0932fc61507f163f322 /test/e2e | |
parent | f7cbb1d8451ae8b9b338aa416e443517a326edba (diff) | |
download | podman-8eb0be0a29a647308b3ed9eab2126e1004b6ba85.tar.gz podman-8eb0be0a29a647308b3ed9eab2126e1004b6ba85.tar.bz2 podman-8eb0be0a29a647308b3ed9eab2126e1004b6ba85.zip |
a few more manual BeTrue cleanups
Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'test/e2e')
-rw-r--r-- | test/e2e/load_test.go | 6 | ||||
-rw-r--r-- | test/e2e/network_test.go | 7 | ||||
-rw-r--r-- | test/e2e/runlabel_test.go | 4 | ||||
-rw-r--r-- | test/e2e/volume_inspect_test.go | 1 |
4 files changed, 8 insertions, 10 deletions
diff --git a/test/e2e/load_test.go b/test/e2e/load_test.go index 030e9f80b..ad5634e0c 100644 --- a/test/e2e/load_test.go +++ b/test/e2e/load_test.go @@ -221,7 +221,7 @@ var _ = Describe("Podman load", func() { result := podmanTest.Podman([]string{"images", "hello:world"}) result.WaitWithDefaultTimeout() - Expect(result.LineInOutputContains("docker")).To(Not(BeTrue())) + Expect(result.OutputToString()).To(Not(ContainSubstring("docker"))) Expect(result.OutputToString()).To(ContainSubstring("localhost")) }) @@ -246,7 +246,7 @@ var _ = Describe("Podman load", func() { result := podmanTest.Podman([]string{"images", "hello:latest"}) result.WaitWithDefaultTimeout() - Expect(result.LineInOutputContains("docker")).To(Not(BeTrue())) + Expect(result.OutputToString()).To(Not(ContainSubstring("docker"))) Expect(result.OutputToString()).To(ContainSubstring("localhost")) }) @@ -272,7 +272,7 @@ var _ = Describe("Podman load", func() { result := podmanTest.Podman([]string{"images", "load:latest"}) result.WaitWithDefaultTimeout() - Expect(result.LineInOutputContains("docker")).To(Not(BeTrue())) + Expect(result.OutputToString()).To(Not(ContainSubstring("docker"))) Expect(result.OutputToString()).To(ContainSubstring("localhost")) }) diff --git a/test/e2e/network_test.go b/test/e2e/network_test.go index aab996e02..ff306f0f8 100644 --- a/test/e2e/network_test.go +++ b/test/e2e/network_test.go @@ -4,7 +4,6 @@ import ( "encoding/json" "fmt" "os" - "strings" "time" "github.com/containers/podman/v3/libpod/network/types" @@ -269,7 +268,7 @@ var _ = Describe("Podman network", func() { Expect(ok).To(BeTrue()) Expect(net.NetworkID).To(Equal(netName)) Expect(net.IPPrefixLen).To(Equal(24)) - Expect(strings.HasPrefix(net.IPAddress, "10.50.50.")).To(BeTrue()) + Expect(net.IPAddress).To(HavePrefix("10.50.50.")) // Necessary to ensure the CNI network is removed cleanly rmAll := podmanTest.Podman([]string{"rm", "-t", "0", "-f", ctrName}) @@ -342,12 +341,12 @@ var _ = Describe("Podman network", func() { Expect(ok).To(BeTrue()) Expect(net1.NetworkID).To(Equal(netName1)) Expect(net1.IPPrefixLen).To(Equal(25)) - Expect(strings.HasPrefix(net1.IPAddress, "10.50.51.")).To(BeTrue()) + Expect(net1.IPAddress).To(HavePrefix("10.50.51.")) net2, ok := conData[0].NetworkSettings.Networks[netName2] Expect(ok).To(BeTrue()) Expect(net2.NetworkID).To(Equal(netName2)) Expect(net2.IPPrefixLen).To(Equal(26)) - Expect(strings.HasPrefix(net2.IPAddress, "10.50.51.")).To(BeTrue()) + Expect(net2.IPAddress).To(HavePrefix("10.50.51.")) // Necessary to ensure the CNI network is removed cleanly rmAll := podmanTest.Podman([]string{"rm", "-t", "0", "-f", ctrName}) diff --git a/test/e2e/runlabel_test.go b/test/e2e/runlabel_test.go index e473119b2..b7b27dc14 100644 --- a/test/e2e/runlabel_test.go +++ b/test/e2e/runlabel_test.go @@ -94,14 +94,14 @@ var _ = Describe("podman container runlabel", func() { result.WaitWithDefaultTimeout() Expect(result).To(ExitWithError()) // should not panic when label missing the value or don't have the label - Expect(result.LineInOutputContains("panic")).NotTo(BeTrue()) + Expect(result.OutputToString()).To(Not(ContainSubstring("panic"))) }) It("podman container runlabel bogus label in remote image should result in non-zero exit", func() { result := podmanTest.Podman([]string{"container", "runlabel", "RUN", "docker.io/library/ubuntu:latest"}) result.WaitWithDefaultTimeout() Expect(result).To(ExitWithError()) // should not panic when label missing the value or don't have the label - Expect(result.LineInOutputContains("panic")).NotTo(BeTrue()) + Expect(result.OutputToString()).To(Not(ContainSubstring("panic"))) }) It("podman container runlabel global options", func() { diff --git a/test/e2e/volume_inspect_test.go b/test/e2e/volume_inspect_test.go index 055be5b19..172063b90 100644 --- a/test/e2e/volume_inspect_test.go +++ b/test/e2e/volume_inspect_test.go @@ -2,7 +2,6 @@ package integration import ( "os" - "strings" . "github.com/containers/podman/v3/test/utils" . "github.com/onsi/ginkgo" |