Skip to content

Commit

Permalink
Minor test EXPECT() improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
AndiDog committed Nov 27, 2024
1 parent 8238c4b commit 5b05e7f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions exp/controllers/awsmachinepool_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ func TestAWSMachinePoolReconciler(t *testing.T) {
MixedInstancesPolicy: awsMachinePool.Spec.MixedInstancesPolicy.DeepCopy(),
}, nil
})
asgSvc.EXPECT().DescribeLifecycleHooks(gomock.Any())
asgSvc.EXPECT().DescribeLifecycleHooks(gomock.Any()).Return(nil, nil)
asgSvc.EXPECT().SubnetIDs(gomock.Any()).Return([]string{"subnet-1"}, nil) // no change
// No changes, so there must not be an ASG update!
asgSvc.EXPECT().UpdateASG(gomock.Any()).Times(0)
Expand Down Expand Up @@ -656,7 +656,7 @@ func TestAWSMachinePoolReconciler(t *testing.T) {
MixedInstancesPolicy: awsMachinePool.Spec.MixedInstancesPolicy.DeepCopy(),
}, nil
})
asgSvc.EXPECT().DescribeLifecycleHooks(gomock.Any())
asgSvc.EXPECT().DescribeLifecycleHooks(gomock.Any()).Return(nil, nil)
asgSvc.EXPECT().SubnetIDs(gomock.Any()).Return([]string{"subnet-1"}, nil) // no change
// No changes, so there must not be an ASG update!
asgSvc.EXPECT().UpdateASG(gomock.Any()).Times(0)
Expand Down Expand Up @@ -741,7 +741,7 @@ func TestAWSMachinePoolReconciler(t *testing.T) {
MixedInstancesPolicy: awsMachinePool.Spec.MixedInstancesPolicy.DeepCopy(),
}, nil
})
asgSvc.EXPECT().DescribeLifecycleHooks(gomock.Any())
asgSvc.EXPECT().DescribeLifecycleHooks(gomock.Any()).Return(nil, nil)
asgSvc.EXPECT().SubnetIDs(gomock.Any()).Return([]string{"subnet-1"}, nil) // no change
// No changes, so there must not be an ASG update!
asgSvc.EXPECT().UpdateASG(gomock.Any()).Times(0)
Expand Down

0 comments on commit 5b05e7f

Please sign in to comment.