diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-11-20 11:23:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-20 11:23:45 +0100 |
commit | eb4b26aab7a48d3f07beb34976a94e62b0111247 (patch) | |
tree | 271ec341c0a495e397d3fff6cdcfbe3bfbc629e0 /test/e2e/network_test.go | |
parent | a18365c908d45a8ee9348c5e32a240a7b9a4091b (diff) | |
parent | f4eac94f4daec3ff2a3ba3b468cc6e60dcd9287d (diff) | |
download | podman-eb4b26aab7a48d3f07beb34976a94e62b0111247.tar.gz podman-eb4b26aab7a48d3f07beb34976a94e62b0111247.tar.bz2 podman-eb4b26aab7a48d3f07beb34976a94e62b0111247.zip |
Merge pull request #8404 from rhatdan/rm
Add alias for podman network rm -> remove
Diffstat (limited to 'test/e2e/network_test.go')
-rw-r--r-- | test/e2e/network_test.go | 55 |
1 files changed, 30 insertions, 25 deletions
diff --git a/test/e2e/network_test.go b/test/e2e/network_test.go index c6593df34..139a90ac7 100644 --- a/test/e2e/network_test.go +++ b/test/e2e/network_test.go @@ -76,31 +76,36 @@ var _ = Describe("Podman network", func() { Expect(session.LineInOutputContains(name)).To(BeFalse()) }) - It("podman network rm no args", func() { - session := podmanTest.Podman([]string{"network", "rm"}) - session.WaitWithDefaultTimeout() - Expect(session.ExitCode()).ToNot(BeZero()) - }) - - It("podman network rm", func() { - SkipIfRootless("FIXME: This one is definitely broken in rootless mode") - name, path := generateNetworkConfig(podmanTest) - defer removeConf(path) - - session := podmanTest.Podman([]string{"network", "ls", "--quiet"}) - session.WaitWithDefaultTimeout() - Expect(session.ExitCode()).To(Equal(0)) - Expect(session.LineInOutputContains(name)).To(BeTrue()) - - rm := podmanTest.Podman([]string{"network", "rm", name}) - rm.WaitWithDefaultTimeout() - Expect(rm.ExitCode()).To(BeZero()) - - results := podmanTest.Podman([]string{"network", "ls", "--quiet"}) - results.WaitWithDefaultTimeout() - Expect(results.ExitCode()).To(Equal(0)) - Expect(results.LineInOutputContains(name)).To(BeFalse()) - }) + rm_func := func(rm string) { + It(fmt.Sprintf("podman network %s no args", rm), func() { + session := podmanTest.Podman([]string{"network", rm}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).ToNot(BeZero()) + + }) + + It(fmt.Sprintf("podman network %s", rm), func() { + name, path := generateNetworkConfig(podmanTest) + defer removeConf(path) + + session := podmanTest.Podman([]string{"network", "ls", "--quiet"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + Expect(session.LineInOutputContains(name)).To(BeTrue()) + + rm := podmanTest.Podman([]string{"network", rm, name}) + rm.WaitWithDefaultTimeout() + Expect(rm.ExitCode()).To(BeZero()) + + results := podmanTest.Podman([]string{"network", "ls", "--quiet"}) + results.WaitWithDefaultTimeout() + Expect(results.ExitCode()).To(Equal(0)) + Expect(results.LineInOutputContains(name)).To(BeFalse()) + }) + } + + rm_func("rm") + rm_func("remove") It("podman network inspect no args", func() { session := podmanTest.Podman([]string{"network", "inspect"}) |