summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJakub Guzik <jakubmguzik@gmail.com>2021-03-05 11:39:03 +0100
committerJakub Guzik <jakubmguzik@gmail.com>2021-03-05 13:16:37 +0100
commit2bcc95257fcbb6d9d20c24c8bcb9de86f0362b15 (patch)
treea7372618353d54c72189728f371ccf1cbe5f1533 /test
parent87e20560ac885c541784af1341098ce8e1e7a940 (diff)
downloadpodman-2bcc95257fcbb6d9d20c24c8bcb9de86f0362b15.tar.gz
podman-2bcc95257fcbb6d9d20c24c8bcb9de86f0362b15.tar.bz2
podman-2bcc95257fcbb6d9d20c24c8bcb9de86f0362b15.zip
Fix for podman network rm (-f) workflow
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/e2e/network_test.go23
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()