Skip to content

Commit

Permalink
test/e2e: do not remove CNI directory
Browse files Browse the repository at this point in the history
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 55508c1 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 <[email protected]>
  • Loading branch information
Luap99 committed May 2, 2023
1 parent 3f5f906 commit 5026545
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 6 deletions.
2 changes: 0 additions & 2 deletions test/e2e/create_staticip_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 0 additions & 2 deletions test/e2e/create_staticmac_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 0 additions & 2 deletions test/e2e/run_staticip_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 5026545

Please sign in to comment.