diff --git a/rest/exec_test.go b/rest/exec_test.go index 290b512c2..bd28ceb44 100644 --- a/rest/exec_test.go +++ b/rest/exec_test.go @@ -192,7 +192,6 @@ func TestConfigToExecCluster(t *testing.T) { }, } for _, test := range tests { - test := test t.Run(test.name, func(t *testing.T) { out, err := ConfigToExecCluster(&test.in) if test.wantErrorPrefix != "" { diff --git a/rest/transport_test.go b/rest/transport_test.go index 93b341030..0468ddea3 100644 --- a/rest/transport_test.go +++ b/rest/transport_test.go @@ -128,7 +128,6 @@ uml0obOEy+ON91k+SWTJ3ggmF/U= var wg sync.WaitGroup for _, tt := range configurations { - tt := tt wg.Add(1) go func() { defer wg.Done() diff --git a/tools/auth/exec/exec_test.go b/tools/auth/exec/exec_test.go index 871474675..6c0d672c5 100644 --- a/tools/auth/exec/exec_test.go +++ b/tools/auth/exec/exec_test.go @@ -254,7 +254,6 @@ func TestLoadExecCredential(t *testing.T) { }, } for _, test := range tests { - test := test t.Run(test.name, func(t *testing.T) { t.Parallel() diff --git a/tools/auth/exec/types_test.go b/tools/auth/exec/types_test.go index bf08da936..4e33b67c8 100644 --- a/tools/auth/exec/types_test.go +++ b/tools/auth/exec/types_test.go @@ -35,7 +35,6 @@ func TestClientAuthenticationClusterTypesAreSynced(t *testing.T) { clientauthenticationv1beta1.Cluster{}, clientauthenticationv1.Cluster{}, } { - cluster := cluster t.Run(fmt.Sprintf("%T", cluster), func(t *testing.T) { t.Parallel() testClientAuthenticationClusterTypesAreSynced(t, cluster) diff --git a/tools/cache/delta_fifo_test.go b/tools/cache/delta_fifo_test.go index 24f0ec87d..3100b30db 100644 --- a/tools/cache/delta_fifo_test.go +++ b/tools/cache/delta_fifo_test.go @@ -278,8 +278,6 @@ func TestDeltaFIFOW_ReplaceMakesDeletionsForObjectsOnlyInQueue(t *testing.T) { }, } for _, tt := range table { - tt := tt - t.Run(tt.name, func(t *testing.T) { // Test with a DeltaFIFO with a backing KnownObjects fWithKnownObjects := NewDeltaFIFOWithOptions(DeltaFIFOOptions{ diff --git a/tools/cache/the_real_fifo_test.go b/tools/cache/the_real_fifo_test.go index 6b9efbd6e..c6a1710cd 100644 --- a/tools/cache/the_real_fifo_test.go +++ b/tools/cache/the_real_fifo_test.go @@ -246,8 +246,6 @@ func TestRealFIFOW_ReplaceMakesDeletionsForObjectsOnlyInQueue(t *testing.T) { }, } for _, tt := range table { - tt := tt - t.Run(tt.name, func(t *testing.T) { // Test with a RealFIFO with a backing KnownObjects fWithKnownObjects := NewRealFIFO( @@ -1394,8 +1392,6 @@ func TestRealFIFO_ReplaceAtomic(t *testing.T) { }, } for _, tt := range table { - tt := tt - t.Run(tt.name, func(t *testing.T) { // Test with a RealFIFO with a backing KnownObjects f := NewRealFIFO( diff --git a/tools/clientcmd/api/v1/defaults_test.go b/tools/clientcmd/api/v1/defaults_test.go index 03fdb0427..5858121ce 100644 --- a/tools/clientcmd/api/v1/defaults_test.go +++ b/tools/clientcmd/api/v1/defaults_test.go @@ -72,7 +72,6 @@ func TestSetDefaults_Config(t *testing.T) { }, } for _, test := range tests { - test := test t.Run(test.name, func(t *testing.T) { gotOut := test.in.DeepCopy() SetDefaults_ExecConfig(gotOut) diff --git a/tools/watch/retrywatcher_test.go b/tools/watch/retrywatcher_test.go index ced27fbe0..3c2229779 100644 --- a/tools/watch/retrywatcher_test.go +++ b/tools/watch/retrywatcher_test.go @@ -548,7 +548,6 @@ func TestRetryWatcher(t *testing.T) { } for _, tc := range tt { - tc := tc t.Run(tc.name, func(t *testing.T) { _, ctx := ktesting.NewTestContext(t) t.Parallel()