Skip to content

Commit

Permalink
fix: docker network not found
Browse files Browse the repository at this point in the history
When the number of procs is less than the number of specs,
multiple specs will share the variable dockerExtNetNetwork,
resulting in the new dockerExtNetNetwork not being properly initialized
  • Loading branch information
shane965 committed Jun 19, 2023
1 parent 7edf404 commit ad2cc24
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions test/e2e/iptables-vpc-nat-gw/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1112,12 +1112,10 @@ var _ = framework.Describe("[group:qos-policy]", func() {
clusterName = cluster
}

if dockerExtNetNetwork == nil {
ginkgo.By("Ensuring docker network " + dockerExtNetName + " exists")
network, err := docker.NetworkCreate(dockerExtNetName, true, true)
framework.ExpectNoError(err, "creating docker network "+dockerExtNetName)
dockerExtNetNetwork = network
}
ginkgo.By("Ensuring docker network " + dockerExtNetName + " exists")
network, err := docker.NetworkCreate(dockerExtNetName, true, true)
framework.ExpectNoError(err, "creating docker network "+dockerExtNetName)
dockerExtNetNetwork = network

ginkgo.By("Getting kind nodes")
nodes, err := kind.ListNodes(clusterName, "")
Expand Down

0 comments on commit ad2cc24

Please sign in to comment.