diff options
author | openshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com> | 2022-06-21 18:19:16 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-21 18:19:16 +0000 |
commit | 8863e13dc3248eaca1cd35359416166e896578f2 (patch) | |
tree | d4784d2a957e4936a73871df0d5b3d9e17c7aed1 /test/e2e | |
parent | c9dce6353d780e249f8a1c3ab8c47f3df83ec679 (diff) | |
parent | 4a981c490be01547c17fb0b1fc4d1c3bfbf3551e (diff) | |
download | podman-8863e13dc3248eaca1cd35359416166e896578f2.tar.gz podman-8863e13dc3248eaca1cd35359416166e896578f2.tar.bz2 podman-8863e13dc3248eaca1cd35359416166e896578f2.zip |
Merge pull request #14643 from clobrano/feature/network/list/dangling/dev
allow filter networks by dangling status
Diffstat (limited to 'test/e2e')
-rw-r--r-- | test/e2e/network_test.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/e2e/network_test.go b/test/e2e/network_test.go index 715455521..2fdd62f7e 100644 --- a/test/e2e/network_test.go +++ b/test/e2e/network_test.go @@ -163,6 +163,26 @@ var _ = Describe("Podman network", func() { Expect(session.OutputToString()).To(Not(ContainSubstring(name))) }) + It("podman network list --filter dangling", func() { + name, path := generateNetworkConfig(podmanTest) + defer removeConf(path) + + session := podmanTest.Podman([]string{"network", "ls", "--filter", "dangling=true"}) + session.WaitWithDefaultTimeout() + Expect(session).Should(Exit(0)) + Expect(session.OutputToString()).To(ContainSubstring(name)) + + session = podmanTest.Podman([]string{"network", "ls", "--filter", "dangling=false"}) + session.WaitWithDefaultTimeout() + Expect(session).Should(Exit(0)) + Expect(session.OutputToString()).NotTo(ContainSubstring(name)) + + session = podmanTest.Podman([]string{"network", "ls", "--filter", "dangling=foo"}) + session.WaitWithDefaultTimeout() + Expect(session).To(ExitWithError()) + Expect(session.ErrorToString()).To(ContainSubstring(`invalid dangling filter value "foo"`)) + }) + It("podman network ID test", func() { net := "networkIDTest" // the network id should be the sha256 hash of the network name |