Skip to content

Commit c9173a2

Browse files
committed
Adjust to CR not setting TypeMeta anymore
1 parent 1a20333 commit c9173a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/controllers/machine/machine_controller_noderef_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1400,15 +1400,15 @@ func Test_shouldNodeHaveOutdatedTaint(t *testing.T) {
14001400
testMachineDeploymentNew.Annotations = map[string]string{clusterv1.RevisionAnnotation: "2"}
14011401

14021402
testMachineSet := builder.MachineSet(namespaceName, "my-ms").
1403-
WithOwnerReferences([]metav1.OwnerReference{*ownerrefs.OwnerReferenceTo(testMachineDeployment, testMachineDeployment.GroupVersionKind())}).
1403+
WithOwnerReferences([]metav1.OwnerReference{*ownerrefs.OwnerReferenceTo(testMachineDeployment, clusterv1.GroupVersion.WithKind("MachineDeployment"))}).
14041404
Build()
14051405
testMachineSet.Annotations = map[string]string{clusterv1.RevisionAnnotation: "1"}
14061406

14071407
labels := map[string]string{
14081408
clusterv1.MachineDeploymentNameLabel: "my-md",
14091409
}
14101410
testMachine := builder.Machine(namespaceName, "my-machine").WithLabels(labels).Build()
1411-
testMachine.SetOwnerReferences([]metav1.OwnerReference{*ownerrefs.OwnerReferenceTo(testMachineSet, testMachineSet.GroupVersionKind())})
1411+
testMachine.SetOwnerReferences([]metav1.OwnerReference{*ownerrefs.OwnerReferenceTo(testMachineSet, clusterv1.GroupVersion.WithKind("MachineSet"))})
14121412

14131413
tests := []struct {
14141414
name string

0 commit comments

Comments
 (0)