summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-01-19 16:56:17 -0500
committerGitHub <noreply@github.com>2021-01-19 16:56:17 -0500
commit5e7262ddf595f9187d01e12f5dcee2fe1c713798 (patch)
tree6cde028a76610dfc85eb7e27af7743af2e9842bb /test
parent37470c4d200c5cde2f8e233dbaa6d200d94919cc (diff)
parenta45d22a1ddd2840cf8c3a38540aa8683cc0d5c7d (diff)
downloadpodman-5e7262ddf595f9187d01e12f5dcee2fe1c713798.tar.gz
podman-5e7262ddf595f9187d01e12f5dcee2fe1c713798.tar.bz2
podman-5e7262ddf595f9187d01e12f5dcee2fe1c713798.zip
Merge pull request #9021 from Luap99/podman-network-exists
podman network exists
Diffstat (limited to 'test')
-rw-r--r--test/e2e/network_test.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/e2e/network_test.go b/test/e2e/network_test.go
index 4e8ab5ad5..98512f01a 100644
--- a/test/e2e/network_test.go
+++ b/test/e2e/network_test.go
@@ -456,4 +456,20 @@ var _ = Describe("Podman network", func() {
nc.WaitWithDefaultTimeout()
Expect(nc.ExitCode()).To(Equal(0))
})
+
+ It("podman network exists", func() {
+ net := "net" + stringid.GenerateNonCryptoID()
+ session := podmanTest.Podman([]string{"network", "create", net})
+ session.WaitWithDefaultTimeout()
+ defer podmanTest.removeCNINetwork(net)
+ Expect(session.ExitCode()).To(BeZero())
+
+ session = podmanTest.Podman([]string{"network", "exists", net})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+
+ session = podmanTest.Podman([]string{"network", "exists", stringid.GenerateNonCryptoID()})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(1))
+ })
})