Skip to content

Commit ece47f3

Browse files
committed
Fix review findings
1 parent ab5a46e commit ece47f3

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

internal/controllers/machinedeployment/machinedeployment_canupdatemachineset_test.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,13 +251,28 @@ func Test_canExtensionsUpdateMachineSet(t *testing.T) {
251251
Template: clusterv1.MachineTemplateSpec{
252252
Spec: clusterv1.MachineSpec{
253253
Version: "v1.30.0",
254+
Bootstrap: clusterv1.Bootstrap{
255+
ConfigRef: clusterv1.ContractVersionedObjectReference{
256+
APIGroup: builder.BootstrapGroupVersion.Group,
257+
Kind: builder.TestBootstrapConfigTemplateKind,
258+
Name: "bootstrap-config-template-1",
259+
},
260+
},
261+
InfrastructureRef: clusterv1.ContractVersionedObjectReference{
262+
APIGroup: builder.InfrastructureGroupVersion.Group,
263+
Kind: builder.TestInfrastructureMachineTemplateKind,
264+
Name: "infrastructure-machine-template-1",
265+
},
254266
},
255267
},
256268
},
257269
}
258270
desiredMachineSet := currentMachineSet.DeepCopy()
259271
desiredMachineSet.Name = "new-machineset"
260272
desiredMachineSet.Spec.Template.Spec.Version = "v1.31.0"
273+
// Note: Changes in refs should not influence the in-place rollout decision.
274+
desiredMachineSet.Spec.Template.Spec.Bootstrap.ConfigRef.Name = "bootstrap-config-template-2"
275+
desiredMachineSet.Spec.Template.Spec.InfrastructureRef.Name = "infrastructure-machine-template-2"
261276

262277
currentBootstrapConfigTemplate := &unstructured.Unstructured{
263278
Object: map[string]interface{}{

0 commit comments

Comments
 (0)