mirror of
https://github.com/kubernetes/client-go.git
synced 2026-05-14 11:03:14 +00:00
Lint: Activate modernize/forvar rule in golangci-lint.
Kubernetes-commit: dd32d7c324b97d259b99c1464802d9e3ca706a94
This commit is contained in:
committed by
Kubernetes Publisher
parent
2f31bfec5d
commit
d91024383a
@@ -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 != "" {
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
2
tools/cache/delta_fifo_test.go
vendored
2
tools/cache/delta_fifo_test.go
vendored
@@ -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{
|
||||
|
||||
4
tools/cache/the_real_fifo_test.go
vendored
4
tools/cache/the_real_fifo_test.go
vendored
@@ -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(
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user