kubernetes/pkg/apis/core/v1
Omer Tuchfeld eb317ecd40 Fix capture loop vars in parallel or ginkgo tests
Fixes instances of #98213 (to ultimately complete #98213 linting is
required).

This commit fixes a few instances of a common mistake done when writing
parallel subtests or Ginkgo tests (basically any test in which the test
closure is dynamically created in a loop and the loop doesn't wait for
the test closure to complete).

I'm developing a very specific linter that detects this king of mistake
and these are the only violations of it it found in this repo (it's not
airtight so there may be more).

In the case of Ginkgo tests, without this fix, only the last entry in
the loop iteratee is actually tested. In the case of Parallel tests I
think it's the same problem but maybe a bit different, iiuc it depends
on the execution speed.

Waiting for the CI to confirm the tests are still passing, even after
this fix - since it's likely it's the first time those test cases are
executed - they may be buggy or testing code that is buggy.

Another instance of this is in `test/e2e/storage/csi_mock_volume.go` and
is still failing so it has been left out of this commit and will be
addressed in a separate one
2022-08-15 16:28:50 +02:00
..
helper Fix capture loop vars in parallel or ginkgo tests 2022-08-15 16:28:50 +02:00
validation Change the users of IsQualifiedName to ValidateQualifiedName 2021-05-18 10:49:15 +02:00
conversion_test.go Honor status.podIP over status.podIPs, node.spec.podCIDR over node.spec.podCIDRs 2020-03-02 14:21:22 -05:00
conversion.go pkg/apis, staging: add HostUsers to pod spec 2022-08-02 23:47:58 +02:00
defaults_test.go Change reflect.Ptr to reflect.Pointer 2022-06-26 01:23:43 +09:00
defaults.go Add MinDomains API to TopologySpreadConstraints field 2022-03-09 20:57:12 +09:00
doc.go Change defaulter-gen input to package path 2021-08-14 11:00:18 -04:00
OWNERS OWNERS cleanup - Jan 2021 Week 1 2022-01-10 08:14:29 -05:00
register.go Fix: pkg/apis Typos in comments, function name, error message 2020-02-24 00:11:00 +09:00
zz_generated.conversion.go Update autogenerated files 2022-08-03 19:53:22 +02:00
zz_generated.defaults.go implement :grpc probe action 2021-11-17 17:31:23 +00:00