@@ -184,13 +184,13 @@ func TestCreate(t *testing.T) {
184
184
185
185
var got * clientcmdapi.Config
186
186
187
- cluster := tt .config .Clusters [tt .config .Contexts [tt .config .CurrentContext ].Cluster ] //nolint:govet // TODO(sttts): fixing this above breaks the test
187
+ cluster := tt .config .Clusters [tt .config .Contexts [tt .config .CurrentContext ].Cluster ]
188
188
u := parseURLOrDie (cluster .Server )
189
189
currentClusterName := logicalcluster .NewPath (strings .TrimPrefix (u .Path , "/clusters/" ))
190
190
u .Path = ""
191
191
192
192
objects := []runtime.Object {}
193
- for _ , name := range tt .existingWorkspaces { //nolint:govet // TODO(sttts): fixing this above breaks the test
193
+ for _ , name := range tt .existingWorkspaces {
194
194
objects = append (objects , & tenancyv1alpha1.Workspace {
195
195
ObjectMeta : metav1.ObjectMeta {
196
196
Name : name ,
@@ -217,7 +217,7 @@ func TestCreate(t *testing.T) {
217
217
}
218
218
}
219
219
220
- if tt .markReady { //nolint:govet // TODO(sttts): fixing this above breaks the test
220
+ if tt .markReady {
221
221
client .PrependReactor ("create" , "workspaces" , func (action kcptesting.Action ) (handled bool , ret runtime.Object , err error ) {
222
222
obj := action .(kcptesting.CreateAction ).GetObject ().(* tenancyv1alpha1.Workspace )
223
223
obj .Status .Phase = corev1alpha1 .LogicalClusterPhaseReady
@@ -233,30 +233,30 @@ func TestCreate(t *testing.T) {
233
233
}
234
234
235
235
opts := NewCreateWorkspaceOptions (genericclioptions .NewTestIOStreamsDiscard ())
236
- opts .Name = tt .newWorkspaceName //nolint:govet // TODO(sttts): fixing this above breaks the test
236
+ opts .Name = tt .newWorkspaceName
237
237
opts .Type = workspaceType .Path + ":" + string (workspaceType .Name )
238
- opts .IgnoreExisting = tt .ignoreExisting //nolint:govet // TODO(sttts): fixing this above breaks the test
239
- opts .EnterAfterCreate = tt .useAfterCreation //nolint:govet // TODO(sttts): fixing this above breaks the test
238
+ opts .IgnoreExisting = tt .ignoreExisting
239
+ opts .EnterAfterCreate = tt .useAfterCreation
240
240
opts .ReadyWaitTimeout = time .Second
241
241
opts .modifyConfig = func (configAccess clientcmd.ConfigAccess , config * clientcmdapi.Config ) error {
242
242
got = config
243
243
return nil
244
244
}
245
245
opts .kcpClusterClient = client
246
- opts .ClientConfig = clientcmd .NewDefaultClientConfig (* tt .config .DeepCopy (), nil ) //nolint:govet // TODO(sttts): fixing this above breaks the test
246
+ opts .ClientConfig = clientcmd .NewDefaultClientConfig (* tt .config .DeepCopy (), nil )
247
247
err := opts .Run (context .Background ())
248
- if tt .wantErr { //nolint:govet // TODO(sttts): fixing this above breaks the test
248
+ if tt .wantErr {
249
249
require .Error (t , err )
250
250
} else {
251
251
require .NoError (t , err )
252
252
}
253
253
254
- if got != nil && tt .expected == nil { //nolint:govet // TODO(sttts): fixing this above breaks the test
254
+ if got != nil && tt .expected == nil {
255
255
t .Errorf ("unexpected kubeconfig write" )
256
- } else if got == nil && tt .expected != nil { //nolint:govet // TODO(sttts): fixing this above breaks the test
256
+ } else if got == nil && tt .expected != nil {
257
257
t .Errorf ("expected a kubeconfig write, but didn't see one" )
258
- } else if got != nil && ! reflect .DeepEqual (got , tt .expected ) { //nolint:govet // TODO(sttts): fixing this above breaks the test
259
- t .Errorf ("unexpected config, diff (expected, got): %s" , cmp .Diff (tt .expected , got )) //nolint:govet // TODO(sttts): fixing this above breaks the test
258
+ } else if got != nil && ! reflect .DeepEqual (got , tt .expected ) {
259
+ t .Errorf ("unexpected config, diff (expected, got): %s" , cmp .Diff (tt .expected , got ))
260
260
}
261
261
})
262
262
}
0 commit comments