Skip to content

Commit 12b0d07

Browse files
committed
fixup! Fix test that passes a nil mutator to 'move'
Address feedback
1 parent e143580 commit 12b0d07

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cmd/clusterctl/client/cluster/mover.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1333,7 +1333,7 @@ func applyMutators(object client.Object, mutators ...ResourceMutatorFunc) (*unst
13331333
if mutator != nil {
13341334
err = mutator(u)
13351335
} else {
1336-
err = fmt.Errorf("mutator is nil")
1336+
err = errors.New("mutator is nil")
13371337
}
13381338
if err != nil {
13391339
return nil, errors.Wrapf(err, "error applying resource mutator to %q %s/%s",

cmd/clusterctl/client/cluster/mover_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2434,7 +2434,7 @@ func Test_applyMutators(t *testing.T) {
24342434
}(),
24352435
},
24362436
{
2437-
name: "return error if any element in mutators slice is nil ",
2437+
name: "return error if any element in mutators slice is nil",
24382438
mutators: []ResourceMutatorFunc{nil},
24392439
object: test.NewFakeCluster("example", "example").Objs()[0],
24402440
wantErr: true,

0 commit comments

Comments
 (0)