kubernetes/pkg
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
..
api Move CSIInlineVolume feature to GA 2022-08-04 13:06:30 -06:00
apis Fix capture loop vars in parallel or ginkgo tests 2022-08-15 16:28:50 +02:00
auth Merge pull request #105598 from gy95/match 2022-01-05 09:22:38 -08:00
capabilities
client Cleanup: defer to close server in tests (#110367) 2022-06-21 08:00:38 -07:00
cloudprovider run update-yamlfmt.sh 2022-01-10 08:14:37 -05:00
cluster/ports e2e_node/{service,util}: use kubelet healthz port. 2022-04-22 16:14:31 -07:00
controller Fix capture loop vars in parallel or ginkgo tests 2022-08-15 16:28:50 +02:00
controlplane Introduce networking/v1alpha1 api, ClusterCIDR type 2022-08-05 00:54:00 +00:00
credentialprovider Generate and format files 2022-07-26 13:14:05 -04:00
features Merge pull request #109090 from sarveshr7/multicidr-rangeallocator 2022-08-07 15:40:18 -07:00
fieldpath Fix quotes that trip up gofmt 2022-07-26 13:14:04 -04:00
generated Merge pull request #111657 from aojea/hc_nodeport 2022-08-09 13:20:39 -07:00
kubeapiserver Merge pull request #109090 from sarveshr7/multicidr-rangeallocator 2022-08-07 15:40:18 -07:00
kubectl add server-side validation support to kubectl 2022-03-26 03:45:13 +00:00
kubelet Add unit tests for DesiredStateOfWorldPopulator 2022-08-04 10:51:59 +02:00
kubemark cleanup: Remove storageos volume plugins from k8s codebase 2022-08-03 20:19:59 +00:00
printers Add describer and printer for ClusterCIDR API 2022-08-05 01:06:42 +00:00
probe Merge pull request #111254 from dims/update-to-golang-1.19-rc2 2022-07-26 14:25:09 -07:00
proxy Merge pull request #110289 from danwinship/kep-3178-source-ranges-drop 2022-07-28 10:21:10 -07:00
quota/v1 Merge pull request #110939 from Abirdcfly/deleteutil 2022-08-03 20:49:46 -07:00
registry Merge pull request #111657 from aojea/hc_nodeport 2022-08-09 13:20:39 -07:00
routes Switch to v3 of github.com/emicklei/go-restful 2022-06-09 14:11:41 -04:00
scheduler fix a memory leak problem when calling DryRunPreemption 2022-08-10 12:02:27 +08:00
security Remove PodSecurityPolicy admission plugin 2022-05-04 16:00:56 -04:00
securitycontext Add missing test cases for RunAsGroup and SetRunAsGroup methods 2021-12-24 17:13:45 +08:00
serviceaccount Generate and format files 2022-07-26 13:14:05 -04:00
util Introduction of a pod condition type indicating disruption. Its reason field indicates the reason: 2022-08-02 11:12:16 +02:00
volume Merge pull request #111258 from dobsonj/kep-596-ga-feature-flag 2022-08-05 13:54:30 -07:00
windows/service Fix typo at pkg/windows/service/service.go:94 2022-03-24 07:25:33 -04:00
.import-restrictions
OWNERS OWNERS cleanup - Jan 2021 Week 1 2022-01-10 08:14:29 -05:00