Skip to content

Commit 5b05e7f

Browse files
committed
Minor test EXPECT() improvement
1 parent 8238c4b commit 5b05e7f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

exp/controllers/awsmachinepool_controller_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@ func TestAWSMachinePoolReconciler(t *testing.T) {
599599
MixedInstancesPolicy: awsMachinePool.Spec.MixedInstancesPolicy.DeepCopy(),
600600
}, nil
601601
})
602-
asgSvc.EXPECT().DescribeLifecycleHooks(gomock.Any())
602+
asgSvc.EXPECT().DescribeLifecycleHooks(gomock.Any()).Return(nil, nil)
603603
asgSvc.EXPECT().SubnetIDs(gomock.Any()).Return([]string{"subnet-1"}, nil) // no change
604604
// No changes, so there must not be an ASG update!
605605
asgSvc.EXPECT().UpdateASG(gomock.Any()).Times(0)
@@ -656,7 +656,7 @@ func TestAWSMachinePoolReconciler(t *testing.T) {
656656
MixedInstancesPolicy: awsMachinePool.Spec.MixedInstancesPolicy.DeepCopy(),
657657
}, nil
658658
})
659-
asgSvc.EXPECT().DescribeLifecycleHooks(gomock.Any())
659+
asgSvc.EXPECT().DescribeLifecycleHooks(gomock.Any()).Return(nil, nil)
660660
asgSvc.EXPECT().SubnetIDs(gomock.Any()).Return([]string{"subnet-1"}, nil) // no change
661661
// No changes, so there must not be an ASG update!
662662
asgSvc.EXPECT().UpdateASG(gomock.Any()).Times(0)
@@ -741,7 +741,7 @@ func TestAWSMachinePoolReconciler(t *testing.T) {
741741
MixedInstancesPolicy: awsMachinePool.Spec.MixedInstancesPolicy.DeepCopy(),
742742
}, nil
743743
})
744-
asgSvc.EXPECT().DescribeLifecycleHooks(gomock.Any())
744+
asgSvc.EXPECT().DescribeLifecycleHooks(gomock.Any()).Return(nil, nil)
745745
asgSvc.EXPECT().SubnetIDs(gomock.Any()).Return([]string{"subnet-1"}, nil) // no change
746746
// No changes, so there must not be an ASG update!
747747
asgSvc.EXPECT().UpdateASG(gomock.Any()).Times(0)

0 commit comments

Comments
 (0)