@@ -324,7 +324,7 @@ func TestAWSMachinePoolReconciler(t *testing.T) {
324
324
setSuspendedProcesses (t , g )
325
325
ms .AWSMachinePool .Spec .SuspendProcesses .All = true
326
326
reconSvc .EXPECT ().ReconcileLaunchTemplate (gomock .Any (), gomock .Any (), gomock .Any (), gomock .Any ()).Return (nil )
327
- reconSvc .EXPECT ().ReconcileLifecycleHooks (gomock .Any (), asgSvc ).Return (nil )
327
+ asgSvc .EXPECT ().DescribeLifecycleHooks (gomock .Any ()).Return (nil , nil )
328
328
reconSvc .EXPECT ().ReconcileTags (gomock .Any (), gomock .Any ()).Return (nil )
329
329
asgSvc .EXPECT ().GetASGByName (gomock .Any ()).Return (& expinfrav1.AutoScalingGroup {
330
330
Name : "name" ,
@@ -365,7 +365,7 @@ func TestAWSMachinePoolReconciler(t *testing.T) {
365
365
setSuspendedProcesses (t , g )
366
366
367
367
reconSvc .EXPECT ().ReconcileLaunchTemplate (gomock .Any (), gomock .Any (), gomock .Any (), gomock .Any ()).Return (nil )
368
- reconSvc .EXPECT ().ReconcileLifecycleHooks (gomock .Any (), asgSvc ).Return (nil )
368
+ asgSvc .EXPECT ().DescribeLifecycleHooks (gomock .Any ()).Return (nil , nil )
369
369
reconSvc .EXPECT ().ReconcileTags (gomock .Any (), gomock .Any ()).Return (nil )
370
370
asgSvc .EXPECT ().GetASGByName (gomock .Any ()).Return (& expinfrav1.AutoScalingGroup {
371
371
Name : "name" ,
@@ -391,7 +391,7 @@ func TestAWSMachinePoolReconciler(t *testing.T) {
391
391
DesiredCapacity : ptr.To [int32 ](1 ),
392
392
}
393
393
reconSvc .EXPECT ().ReconcileLaunchTemplate (gomock .Any (), gomock .Any (), gomock .Any (), gomock .Any ()).Return (nil )
394
- reconSvc .EXPECT ().ReconcileLifecycleHooks (gomock .Any (), asgSvc ).Return (nil )
394
+ asgSvc .EXPECT ().DescribeLifecycleHooks (gomock .Any ()).Return (nil , nil )
395
395
asgSvc .EXPECT ().GetASGByName (gomock .Any ()).Return (& asg , nil )
396
396
asgSvc .EXPECT ().SubnetIDs (gomock .Any ()).Return ([]string {}, nil )
397
397
asgSvc .EXPECT ().UpdateASG (gomock .Any ()).Return (nil )
@@ -431,7 +431,7 @@ func TestAWSMachinePoolReconciler(t *testing.T) {
431
431
Subnets : []string {"subnet1" , "subnet2" },
432
432
}
433
433
reconSvc .EXPECT ().ReconcileLaunchTemplate (gomock .Any (), gomock .Any (), gomock .Any (), gomock .Any ()).Return (nil )
434
- reconSvc .EXPECT ().ReconcileLifecycleHooks (gomock .Any (), asgSvc ).Return (nil )
434
+ asgSvc .EXPECT ().DescribeLifecycleHooks (gomock .Any ()).Return (nil , nil )
435
435
reconSvc .EXPECT ().ReconcileTags (gomock .Any (), gomock .Any ()).Return (nil )
436
436
asgSvc .EXPECT ().GetASGByName (gomock .Any ()).Return (& asg , nil ).AnyTimes ()
437
437
asgSvc .EXPECT ().SubnetIDs (gomock .Any ()).Return ([]string {"subnet2" , "subnet1" }, nil ).Times (1 )
@@ -451,7 +451,7 @@ func TestAWSMachinePoolReconciler(t *testing.T) {
451
451
Subnets : []string {"subnet1" , "subnet2" },
452
452
}
453
453
reconSvc .EXPECT ().ReconcileLaunchTemplate (gomock .Any (), gomock .Any (), gomock .Any (), gomock .Any ()).Return (nil )
454
- reconSvc .EXPECT ().ReconcileLifecycleHooks (gomock .Any (), asgSvc ).Return (nil )
454
+ asgSvc .EXPECT ().DescribeLifecycleHooks (gomock .Any ()).Return (nil , nil )
455
455
reconSvc .EXPECT ().ReconcileTags (gomock .Any (), gomock .Any ()).Return (nil )
456
456
asgSvc .EXPECT ().GetASGByName (gomock .Any ()).Return (& asg , nil ).AnyTimes ()
457
457
asgSvc .EXPECT ().SubnetIDs (gomock .Any ()).Return ([]string {"subnet1" }, nil ).Times (1 )
@@ -471,7 +471,7 @@ func TestAWSMachinePoolReconciler(t *testing.T) {
471
471
Subnets : []string {},
472
472
}
473
473
reconSvc .EXPECT ().ReconcileLaunchTemplate (gomock .Any (), gomock .Any (), gomock .Any (), gomock .Any ()).Return (nil )
474
- reconSvc .EXPECT ().ReconcileLifecycleHooks (gomock .Any (), asgSvc ).Return (nil )
474
+ asgSvc .EXPECT ().DescribeLifecycleHooks (gomock .Any ()).Return (nil , nil )
475
475
reconSvc .EXPECT ().ReconcileTags (gomock .Any (), gomock .Any ()).Return (nil )
476
476
asgSvc .EXPECT ().GetASGByName (gomock .Any ()).Return (& asg , nil ).AnyTimes ()
477
477
asgSvc .EXPECT ().SubnetIDs (gomock .Any ()).Return ([]string {}, nil ).Times (1 )
@@ -545,7 +545,7 @@ func TestAWSMachinePoolReconciler(t *testing.T) {
545
545
MixedInstancesPolicy : awsMachinePool .Spec .MixedInstancesPolicy .DeepCopy (),
546
546
}, nil
547
547
})
548
- asgSvc .EXPECT ().GetLifecycleHooks (gomock .Any ()).Return (nil , nil ).AnyTimes ()
548
+ asgSvc .EXPECT ().DescribeLifecycleHooks (gomock .Any ()).Return (nil , nil ).AnyTimes ()
549
549
asgSvc .EXPECT ().SubnetIDs (gomock .Any ()).Return ([]string {"subnet-1" }, nil ) // no change
550
550
// No changes, so there must not be an ASG update!
551
551
asgSvc .EXPECT ().UpdateASG (gomock .Any ()).Times (0 )
@@ -599,7 +599,7 @@ func TestAWSMachinePoolReconciler(t *testing.T) {
599
599
MixedInstancesPolicy : awsMachinePool .Spec .MixedInstancesPolicy .DeepCopy (),
600
600
}, nil
601
601
})
602
- asgSvc .EXPECT ().GetLifecycleHooks (gomock .Any ())
602
+ asgSvc .EXPECT ().DescribeLifecycleHooks (gomock .Any ())
603
603
asgSvc .EXPECT ().SubnetIDs (gomock .Any ()).Return ([]string {"subnet-1" }, nil ) // no change
604
604
// No changes, so there must not be an ASG update!
605
605
asgSvc .EXPECT ().UpdateASG (gomock .Any ()).Times (0 )
@@ -656,7 +656,7 @@ func TestAWSMachinePoolReconciler(t *testing.T) {
656
656
MixedInstancesPolicy : awsMachinePool .Spec .MixedInstancesPolicy .DeepCopy (),
657
657
}, nil
658
658
})
659
- asgSvc .EXPECT ().GetLifecycleHooks (gomock .Any ())
659
+ asgSvc .EXPECT ().DescribeLifecycleHooks (gomock .Any ())
660
660
asgSvc .EXPECT ().SubnetIDs (gomock .Any ()).Return ([]string {"subnet-1" }, nil ) // no change
661
661
// No changes, so there must not be an ASG update!
662
662
asgSvc .EXPECT ().UpdateASG (gomock .Any ()).Times (0 )
@@ -741,7 +741,7 @@ func TestAWSMachinePoolReconciler(t *testing.T) {
741
741
MixedInstancesPolicy : awsMachinePool .Spec .MixedInstancesPolicy .DeepCopy (),
742
742
}, nil
743
743
})
744
- asgSvc .EXPECT ().GetLifecycleHooks (gomock .Any ())
744
+ asgSvc .EXPECT ().DescribeLifecycleHooks (gomock .Any ())
745
745
asgSvc .EXPECT ().SubnetIDs (gomock .Any ()).Return ([]string {"subnet-1" }, nil ) // no change
746
746
// No changes, so there must not be an ASG update!
747
747
asgSvc .EXPECT ().UpdateASG (gomock .Any ()).Times (0 )
0 commit comments