mirror of
https://github.com/containers/podman.git
synced 2025-06-24 19:42:56 +08:00
fix e2e test missing network cleanup
I noticed that this test will fail its flake rerun because the network was not removed and it tried to create a network with the same name. Also network disconnect works rootless now. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@ -355,13 +355,12 @@ var _ = Describe("Podman network", func() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
It("podman network remove after disconnect when container initially created with the network", func() {
|
It("podman network remove after disconnect when container initially created with the network", func() {
|
||||||
SkipIfRootless("disconnect works only in non rootless container")
|
|
||||||
|
|
||||||
container := "test"
|
container := "test"
|
||||||
network := "foo"
|
network := "foo" + stringid.GenerateNonCryptoID()
|
||||||
|
|
||||||
session := podmanTest.Podman([]string{"network", "create", network})
|
session := podmanTest.Podman([]string{"network", "create", network})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
|
defer podmanTest.removeCNINetwork(network)
|
||||||
Expect(session).Should(Exit(0))
|
Expect(session).Should(Exit(0))
|
||||||
|
|
||||||
session = podmanTest.Podman([]string{"run", "--name", container, "--network", network, "-d", ALPINE, "top"})
|
session = podmanTest.Podman([]string{"run", "--name", container, "--network", network, "-d", ALPINE, "top"})
|
||||||
|
Reference in New Issue
Block a user