From 502654580357a6b1d6577bc040784f562fd02a09 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Tue, 2 May 2023 10:42:06 +0200 Subject: [PATCH] test/e2e: do not remove CNI directory This is not safe at all when run in parallel, CNI needs that directory to detect duplicated ips and also stores other important network info in it. Removing it while container network is setup is not safe at all and could cause a lot of weird flakes. This "hack" was added in commit 55508c11 but provides zero context what this was supposed to fix so I don't know what the actual issue is or was. Fixes #18399 Signed-off-by: Paul Holzinger --- test/e2e/create_staticip_test.go | 2 -- test/e2e/create_staticmac_test.go | 2 -- test/e2e/run_staticip_test.go | 2 -- 3 files changed, 6 deletions(-) diff --git a/test/e2e/create_staticip_test.go b/test/e2e/create_staticip_test.go index b45b2b5db8..1d269c0128 100644 --- a/test/e2e/create_staticip_test.go +++ b/test/e2e/create_staticip_test.go @@ -24,8 +24,6 @@ var _ = Describe("Podman create with --ip flag", func() { } podmanTest = PodmanTestCreate(tempdir) podmanTest.Setup() - // Clean up the CNI networks used by the tests - os.RemoveAll("/var/lib/cni/networks/podman") }) AfterEach(func() { diff --git a/test/e2e/create_staticmac_test.go b/test/e2e/create_staticmac_test.go index 4ab609a309..40ae92197b 100644 --- a/test/e2e/create_staticmac_test.go +++ b/test/e2e/create_staticmac_test.go @@ -24,8 +24,6 @@ var _ = Describe("Podman run with --mac-address flag", func() { } podmanTest = PodmanTestCreate(tempdir) podmanTest.Setup() - // Clean up the CNI networks used by the tests - os.RemoveAll("/var/lib/cni/networks/podman") }) AfterEach(func() { diff --git a/test/e2e/run_staticip_test.go b/test/e2e/run_staticip_test.go index 6e317e4a1d..8c9ea0326d 100644 --- a/test/e2e/run_staticip_test.go +++ b/test/e2e/run_staticip_test.go @@ -28,8 +28,6 @@ var _ = Describe("Podman run with --ip flag", func() { } podmanTest = PodmanTestCreate(tempdir) podmanTest.Setup() - // Clean up the CNI networks used by the tests - os.RemoveAll("/var/lib/cni/networks/podman") }) AfterEach(func() {