diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-03-05 09:50:03 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-05 09:50:03 -0500 |
commit | 0bac30d724643cf84d49e643a17bd8fd304efde1 (patch) | |
tree | de5451b8395102acb8ecfaf6d53232307be6a2db /test/e2e/network_test.go | |
parent | c6cefa5f0450a433044ac2d002e4c77ba9e3614b (diff) | |
parent | 2bcc95257fcbb6d9d20c24c8bcb9de86f0362b15 (diff) | |
download | podman-0bac30d724643cf84d49e643a17bd8fd304efde1.tar.gz podman-0bac30d724643cf84d49e643a17bd8fd304efde1.tar.bz2 podman-0bac30d724643cf84d49e643a17bd8fd304efde1.zip |
Merge pull request #9622 from jmguzik/network-rm-fix
Fix podman network rm (-f) workflow
Diffstat (limited to 'test/e2e/network_test.go')
-rw-r--r-- | test/e2e/network_test.go | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/e2e/network_test.go b/test/e2e/network_test.go index 53521cdc4..ff2e1eb66 100644 --- a/test/e2e/network_test.go +++ b/test/e2e/network_test.go @@ -352,6 +352,29 @@ var _ = Describe("Podman network", func() { Expect(rmAll.ExitCode()).To(BeZero()) }) + It("podman network remove after disconnect when container initially created with the network", func() { + SkipIfRootless("disconnect works only in non rootless container") + + container := "test" + network := "foo" + + session := podmanTest.Podman([]string{"network", "create", network}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + + session = podmanTest.Podman([]string{"run", "--name", container, "--network", network, "-d", ALPINE, "top"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + + session = podmanTest.Podman([]string{"network", "disconnect", network, container}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + + session = podmanTest.Podman([]string{"network", "rm", network}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + }) + It("podman network remove bogus", func() { session := podmanTest.Podman([]string{"network", "rm", "bogus"}) session.WaitWithDefaultTimeout() |