@@ -349,7 +349,7 @@ var _ = Describe("machineDeploymentToInstanceType function", func() {
349349 Expect (instanceType .Capacity ).Should (HaveKeyWithValue (corev1 .ResourceCPU , resource .MustParse ("1" )))
350350 Expect (instanceType .Capacity ).Should (HaveKeyWithValue (corev1 .ResourceMemory , resource .MustParse ("16Gi" )))
351351 Expect (instanceType .Capacity ).Should (HaveKeyWithValue (corev1 .ResourceName ("nvidia.com/gpu" ), resource .MustParse ("1" )))
352- Expect (instanceType .Name ).To (Equal (machineDeployment .Name ))
352+ Expect (instanceType .MachineDeploymentName ).To (Equal (machineDeployment .Name ))
353353 })
354354
355355 It ("adds nothing to requirements when no managed labels or scale from zero annotations are present" , func () {
@@ -358,7 +358,7 @@ var _ = Describe("machineDeploymentToInstanceType function", func() {
358358 instanceType := machineDeploymentToInstanceType (machineDeployment )
359359
360360 Expect (instanceType .Requirements ).To (HaveLen (0 ))
361- Expect (instanceType .Name ).To (Equal (machineDeployment .Name ))
361+ Expect (instanceType .MachineDeploymentName ).To (Equal (machineDeployment .Name ))
362362 })
363363
364364 It ("adds labels to the requirements from the Cluster API propagation rules" , func () {
@@ -381,7 +381,7 @@ var _ = Describe("machineDeploymentToInstanceType function", func() {
381381 Expect (instanceType .Requirements ).Should (HaveKey ("prefixed.node-restriction.kubernetes.io/some-other-thing" ))
382382 Expect (instanceType .Requirements ).Should (HaveKey ("node.cluster.x-k8s.io/another-thing" ))
383383 Expect (instanceType .Requirements ).Should (HaveKey ("prefixed.node.cluster.x-k8s.io/another-thing" ))
384- Expect (instanceType .Name ).To (Equal (machineDeployment .Name ))
384+ Expect (instanceType .MachineDeploymentName ).To (Equal (machineDeployment .Name ))
385385 })
386386
387387 It ("adds labels to the requirements from the scale from zero annotations" , func () {
@@ -395,7 +395,7 @@ var _ = Describe("machineDeploymentToInstanceType function", func() {
395395 Expect (instanceType .Requirements ).To (HaveLen (2 ))
396396 Expect (instanceType .Requirements ).Should (HaveKey (corev1 .LabelTopologyZone ))
397397 Expect (instanceType .Requirements ).Should (HaveKey (InstanceSizeLabelKey ))
398- Expect (instanceType .Name ).To (Equal (machineDeployment .Name ))
398+ Expect (instanceType .MachineDeploymentName ).To (Equal (machineDeployment .Name ))
399399 })
400400
401401 It ("adds labels to the requirements from the propagation rules and the scale from zero annotations" , func () {
@@ -424,7 +424,7 @@ var _ = Describe("machineDeploymentToInstanceType function", func() {
424424 Expect (instanceType .Requirements ).Should (HaveKey ("prefixed.node-restriction.kubernetes.io/some-other-thing" ))
425425 Expect (instanceType .Requirements ).Should (HaveKey ("node.cluster.x-k8s.io/another-thing" ))
426426 Expect (instanceType .Requirements ).Should (HaveKey ("prefixed.node.cluster.x-k8s.io/another-thing" ))
427- Expect (instanceType .Name ).To (Equal (machineDeployment .Name ))
427+ Expect (instanceType .MachineDeploymentName ).To (Equal (machineDeployment .Name ))
428428 })
429429
430430 It ("adds a single available on-demand offering with price 0 and empty zone" , func () {
@@ -438,7 +438,7 @@ var _ = Describe("machineDeploymentToInstanceType function", func() {
438438 Expect (offering .Requirements [karpv1 .CapacityTypeLabelKey ].Values ()).Should (ContainElement (karpv1 .CapacityTypeOnDemand ))
439439 Expect (offering .Requirements ).Should (HaveKey (corev1 .LabelTopologyZone ))
440440 Expect (offering .Requirements [corev1 .LabelTopologyZone ].Values ()).Should (ContainElement ("" ))
441- Expect (instanceType .Name ).To (Equal (machineDeployment .Name ))
441+ Expect (instanceType .MachineDeploymentName ).To (Equal (machineDeployment .Name ))
442442 })
443443
444444 It ("adds the correct zone to offering when the well known zone label is present" , func () {
@@ -453,7 +453,7 @@ var _ = Describe("machineDeploymentToInstanceType function", func() {
453453 offering := instanceType .Offerings [0 ]
454454 Expect (offering .Requirements ).Should (HaveKey (corev1 .LabelTopologyZone ))
455455 Expect (offering .Requirements [corev1 .LabelTopologyZone ].Values ()).Should (ContainElement (zone ))
456- Expect (instanceType .Name ).To (Equal (machineDeployment .Name ))
456+ Expect (instanceType .MachineDeploymentName ).To (Equal (machineDeployment .Name ))
457457 })
458458})
459459
0 commit comments