Skip to content

Commit

Permalink
fixup! Fix test that passes a nil mutator to 'move'
Browse files Browse the repository at this point in the history
Address feedback
  • Loading branch information
dlipovetsky authored and k8s-infra-cherrypick-robot committed Aug 1, 2024
1 parent caa479e commit 3d426cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/clusterctl/client/cluster/mover.go
Original file line number Diff line number Diff line change
Expand Up @@ -1333,7 +1333,7 @@ func applyMutators(object client.Object, mutators ...ResourceMutatorFunc) (*unst
if mutator != nil {
err = mutator(u)
} else {
err = fmt.Errorf("mutator is nil")
err = errors.New("mutator is nil")
}
if err != nil {
return nil, errors.Wrapf(err, "error applying resource mutator to %q %s/%s",
Expand Down
2 changes: 1 addition & 1 deletion cmd/clusterctl/client/cluster/mover_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2434,7 +2434,7 @@ func Test_applyMutators(t *testing.T) {
}(),
},
{
name: "return error if any element in mutators slice is nil ",
name: "return error if any element in mutators slice is nil",
mutators: []ResourceMutatorFunc{nil},
object: test.NewFakeCluster("example", "example").Objs()[0],
wantErr: true,
Expand Down

0 comments on commit 3d426cb

Please sign in to comment.