fix "podman system prune networks" flake

Since by default the network config dir is shared in the e2e tests any
other parallel running test could remove a network and cause this test to
fail.

Fixes #15990

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger
2022-09-29 14:37:02 +02:00
parent f52feded3c
commit 3b5171d0ee
2 changed files with 8 additions and 2 deletions

View File

@ -706,7 +706,7 @@ var _ = Describe("Podman network", func() {
})
It("podman network prune --filter", func() {
// set custom cni directory to prevent flakes
// set custom network directory to prevent flakes since the dir is shared with all tests by default
podmanTest.NetworkConfigDir = tempdir
if IsRemote() {
podmanTest.RestartRemoteService()
@ -754,7 +754,7 @@ var _ = Describe("Podman network", func() {
})
It("podman network prune", func() {
// set custom cni directory to prevent flakes
// set custom network directory to prevent flakes since the dir is shared with all tests by default
podmanTest.NetworkConfigDir = tempdir
if IsRemote() {
podmanTest.RestartRemoteService()

View File

@ -259,6 +259,12 @@ var _ = Describe("Podman prune", func() {
})
It("podman system prune networks", func() {
// set custom network directory to prevent flakes since the dir is shared with all tests by default
podmanTest.NetworkConfigDir = tempdir
if IsRemote() {
podmanTest.RestartRemoteService()
}
// Create new network.
session := podmanTest.Podman([]string{"network", "create", "test"})
session.WaitWithDefaultTimeout()