moby/integration/network
Paweł Gronowski c6031ad519
integration: Don't env cleanup before parallel subtests
Calling function returned from setupTest (which calls testEnv.Clean) in
a defer block inside a test that spawns parallel subtests caused the
cleanup function to be called before any of the subtest did anything.

Change the defer expressions to use `t.Cleanup` instead to call it only
after all subtests have also finished.
This only changes tests which have parallel subtests.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit f9e2eed55d)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-07-13 15:07:08 +02:00
..
ipvlan Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
macvlan Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
delete_test.go bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-11 00:06:42 +01:00
dns_test.go integration/network: remove IsUserNamespace in favor of testenv equivalent 2021-08-12 09:12:04 +02:00
helpers.go Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
helpers_windows.go integration/network: remove IsUserNamespace in favor of testenv equivalent 2021-08-12 09:12:04 +02:00
inspect_test.go test-integration: support more rootless tests 2020-03-16 17:37:38 +09:00
main_test.go testutil: make testing packages public 2019-09-11 07:47:23 -05:00
network_test.go integration: Don't env cleanup before parallel subtests 2023-07-13 15:07:08 +02:00
service_test.go integration: fix empty-lines (revive) 2022-09-30 23:59:30 +02:00