aboutsummaryrefslogtreecommitdiff
path: root/test/e2e/network_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/e2e/network_test.go')
-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))
+ })
})