summaryrefslogtreecommitdiff
path: root/test/e2e/network_test.go
diff options
context:
space:
mode:
authorEd Santiago <santiago@redhat.com>2021-11-30 10:00:17 -0700
committerEd Santiago <santiago@redhat.com>2021-11-30 10:13:16 -0700
commit8eb0be0a29a647308b3ed9eab2126e1004b6ba85 (patch)
treed1e806225b1f1fe93feac0932fc61507f163f322 /test/e2e/network_test.go
parentf7cbb1d8451ae8b9b338aa416e443517a326edba (diff)
downloadpodman-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/network_test.go')
-rw-r--r--test/e2e/network_test.go7
1 files changed, 3 insertions, 4 deletions
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})