diff options
author | Paul Holzinger <paul.holzinger@web.de> | 2021-01-18 18:52:06 +0100 |
---|---|---|
committer | Paul Holzinger <paul.holzinger@web.de> | 2021-01-19 15:18:03 +0100 |
commit | a45d22a1ddd2840cf8c3a38540aa8683cc0d5c7d (patch) | |
tree | dfda1d8d5f64baa183dc0f166e2441d8719b1cc8 /test/e2e | |
parent | 5b3c7a52939275784c45c9747dd5864bd0581ff5 (diff) | |
download | podman-a45d22a1ddd2840cf8c3a38540aa8683cc0d5c7d.tar.gz podman-a45d22a1ddd2840cf8c3a38540aa8683cc0d5c7d.tar.bz2 podman-a45d22a1ddd2840cf8c3a38540aa8683cc0d5c7d.zip |
podman network exists
Add podman network exists command with remote support.
Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
Diffstat (limited to 'test/e2e')
-rw-r--r-- | test/e2e/network_test.go | 16 |
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)) + }) }) |