@@ -313,7 +313,7 @@ func TestAWSMachineReconciler(t *testing.T) {
313313 expectedErr := errors .New ("Invalid instance" )
314314 ec2Svc .EXPECT ().InstanceIfExists (gomock .Any ()).Return (nil , nil )
315315 secretSvc .EXPECT ().Create (gomock .Any (), gomock .Any ()).Return ("test" , int32 (1 ), nil ).Times (1 )
316- ec2Svc .EXPECT ().CreateInstance (gomock .Any (), gomock .Any (), gomock .Any ()).Return (nil , expectedErr )
316+ ec2Svc .EXPECT ().CreateInstance (gomock .Any (), gomock .Any (), gomock .Any (), gomock . Any () ).Return (nil , expectedErr )
317317 secretSvc .EXPECT ().UserData (gomock .Any (), gomock .Any (), gomock .Any (), gomock .Any ()).Return (nil , nil ).Times (1 )
318318
319319 _ , err := reconciler .reconcileNormal (context .Background (), ms , cs , cs , cs , cs )
@@ -349,7 +349,7 @@ func TestAWSMachineReconciler(t *testing.T) {
349349 instance .State = infrav1 .InstanceStatePending
350350
351351 ec2Svc .EXPECT ().GetRunningInstanceByTags (gomock .Any ()).Return (nil , nil )
352- ec2Svc .EXPECT ().CreateInstance (gomock .Any (), gomock .Any (), gomock .Any ()).Return (instance , nil )
352+ ec2Svc .EXPECT ().CreateInstance (gomock .Any (), gomock .Any (), gomock .Any (), gomock . Any () ).Return (instance , nil )
353353 }
354354
355355 t .Run ("instance security group errors" , func (t * testing.T ) {
@@ -785,7 +785,7 @@ func TestAWSMachineReconciler(t *testing.T) {
785785 return elbSvc
786786 }
787787
788- ec2Svc .EXPECT ().CreateInstance (gomock .Any (), gomock .Any (), gomock .Any ()).Return (instance , nil )
788+ ec2Svc .EXPECT ().CreateInstance (gomock .Any (), gomock .Any (), gomock .Any (), gomock . Any () ).Return (instance , nil )
789789 ec2Svc .EXPECT ().GetRunningInstanceByTags (gomock .Any ()).Return (nil , nil )
790790 elbSvc .EXPECT ().IsInstanceRegisteredWithAPIServerELB (gomock .Any ()).Return (false , errors .New ("error describing ELB" ))
791791 secretSvc .EXPECT ().UserData (gomock .Any (), gomock .Any (), gomock .Any (), gomock .Any ()).Return (nil , nil ).Times (1 )
@@ -811,7 +811,7 @@ func TestAWSMachineReconciler(t *testing.T) {
811811 return elbSvc
812812 }
813813
814- ec2Svc .EXPECT ().CreateInstance (gomock .Any (), gomock .Any (), gomock .Any ()).Return (instance , nil )
814+ ec2Svc .EXPECT ().CreateInstance (gomock .Any (), gomock .Any (), gomock .Any (), gomock . Any () ).Return (instance , nil )
815815 ec2Svc .EXPECT ().GetRunningInstanceByTags (gomock .Any ()).Return (nil , nil )
816816 elbSvc .EXPECT ().IsInstanceRegisteredWithAPIServerELB (gomock .Any ()).Return (false , nil )
817817 elbSvc .EXPECT ().RegisterInstanceWithAPIServerELB (gomock .Any ()).Return (errors .New ("failed to attach ELB" ))
@@ -842,7 +842,7 @@ func TestAWSMachineReconciler(t *testing.T) {
842842 ensureTag := func (t * testing.T , g * WithT ) {
843843 t .Helper ()
844844 ec2Svc .EXPECT ().InstanceIfExists (gomock .Any ()).Return (nil , nil )
845- ec2Svc .EXPECT ().CreateInstance (gomock .Any (), gomock .Any (), gomock .Any ()).Return (instance , nil )
845+ ec2Svc .EXPECT ().CreateInstance (gomock .Any (), gomock .Any (), gomock .Any (), gomock . Any () ).Return (instance , nil )
846846 secretSvc .EXPECT ().Create (gomock .Any (), gomock .Any ()).Return ("test" , int32 (1 ), nil )
847847 secretSvc .EXPECT ().UserData (gomock .Any (), gomock .Any (), gomock .Any (), gomock .Any ()).Return (nil , nil )
848848 }
@@ -888,7 +888,7 @@ func TestAWSMachineReconciler(t *testing.T) {
888888 ensureSecurityGroups := func (t * testing.T , g * WithT ) {
889889 t .Helper ()
890890 ec2Svc .EXPECT ().InstanceIfExists (gomock .Any ()).Return (nil , nil )
891- ec2Svc .EXPECT ().CreateInstance (gomock .Any (), gomock .Any (), gomock .Any ()).Return (instance , nil )
891+ ec2Svc .EXPECT ().CreateInstance (gomock .Any (), gomock .Any (), gomock .Any (), gomock . Any () ).Return (instance , nil )
892892 secretSvc .EXPECT ().Create (gomock .Any (), gomock .Any ()).Return ("test" , int32 (1 ), nil )
893893 secretSvc .EXPECT ().UserData (gomock .Any (), gomock .Any (), gomock .Any (), gomock .Any ()).Return (nil , nil )
894894 ec2Svc .EXPECT ().GetInstanceSecurityGroups (gomock .Any ()).Return (map [string ][]string {"eid" : {}}, nil )
@@ -1011,7 +1011,7 @@ func TestAWSMachineReconciler(t *testing.T) {
10111011
10121012 ec2Svc .EXPECT ().GetRunningInstanceByTags (gomock .Any ()).Return (nil , nil ).AnyTimes ()
10131013 secretSvc .EXPECT ().Create (gomock .Any (), gomock .Any ()).Return (secretPrefix , int32 (1 ), nil ).Times (1 )
1014- ec2Svc .EXPECT ().CreateInstance (gomock .Any (), gomock .Any (), gomock .Any ()).Return (instance , nil ).AnyTimes ()
1014+ ec2Svc .EXPECT ().CreateInstance (gomock .Any (), gomock .Any (), gomock .Any (), gomock . Any () ).Return (instance , nil ).AnyTimes ()
10151015 secretSvc .EXPECT ().UserData (gomock .Any (), gomock .Any (), gomock .Any (), gomock .Any ()).Return (nil , nil ).Times (1 )
10161016 ec2Svc .EXPECT ().GetInstanceSecurityGroups (gomock .Any ()).Return (map [string ][]string {"eid" : {}}, nil ).Times (1 )
10171017 ec2Svc .EXPECT ().GetCoreSecurityGroups (gomock .Any ()).Return ([]string {}, nil ).Times (1 )
@@ -1048,7 +1048,7 @@ func TestAWSMachineReconciler(t *testing.T) {
10481048
10491049 ec2Svc .EXPECT ().GetRunningInstanceByTags (gomock .Any ()).Return (nil , nil ).AnyTimes ()
10501050 secretSvc .EXPECT ().Create (gomock .Any (), gomock .Any ()).Return (secretPrefix , int32 (1 ), nil ).Times (1 )
1051- ec2Svc .EXPECT ().CreateInstance (gomock .Any (), gomock .Any (), gomock .Any ()).Return (instance , nil ).AnyTimes ()
1051+ ec2Svc .EXPECT ().CreateInstance (gomock .Any (), gomock .Any (), gomock .Any (), gomock . Any () ).Return (instance , nil ).AnyTimes ()
10521052 secretSvc .EXPECT ().UserData (gomock .Any (), gomock .Any (), gomock .Any (), gomock .Any ()).Return (nil , nil ).Times (1 )
10531053 ec2Svc .EXPECT ().GetInstanceSecurityGroups (gomock .Any ()).Return (map [string ][]string {"eid" : {}}, nil ).Times (1 )
10541054 ec2Svc .EXPECT ().GetCoreSecurityGroups (gomock .Any ()).Return ([]string {}, nil ).Times (1 )
@@ -1304,7 +1304,7 @@ func TestAWSMachineReconciler(t *testing.T) {
13041304 }
13051305 instance .State = infrav1 .InstanceStatePending
13061306 secretSvc .EXPECT ().Create (gomock .Any (), gomock .Any ()).Return (secretPrefix , int32 (1 ), nil ).Times (1 )
1307- ec2Svc .EXPECT ().CreateInstance (gomock .Any (), gomock .Any (), gomock .Any ()).Return (instance , nil ).AnyTimes ()
1307+ ec2Svc .EXPECT ().CreateInstance (gomock .Any (), gomock .Any (), gomock .Any (), gomock . Any () ).Return (instance , nil ).AnyTimes ()
13081308 secretSvc .EXPECT ().UserData (gomock .Any (), gomock .Any (), gomock .Any (), gomock .Any ()).Return (nil , nil ).Times (1 )
13091309 ec2Svc .EXPECT ().GetInstanceSecurityGroups (gomock .Any ()).Return (map [string ][]string {"eid" : {}}, nil ).Times (1 )
13101310 ec2Svc .EXPECT ().GetCoreSecurityGroups (gomock .Any ()).Return ([]string {}, nil ).Times (1 )
@@ -1357,7 +1357,7 @@ func TestAWSMachineReconciler(t *testing.T) {
13571357 fakeS3URL := "s3://foo"
13581358
13591359 objectStoreSvc .EXPECT ().Create (gomock .Any (), gomock .Any (), gomock .Any ()).Return (fakeS3URL , nil ).Times (1 )
1360- ec2Svc .EXPECT ().CreateInstance (gomock .Any (), gomock .Any (), gomock .Any ()).Return (instance , nil ).AnyTimes ()
1360+ ec2Svc .EXPECT ().CreateInstance (gomock .Any (), gomock .Any (), gomock .Any (), gomock . Any () ).Return (instance , nil ).AnyTimes ()
13611361 ec2Svc .EXPECT ().GetInstanceSecurityGroups (gomock .Any ()).Return (map [string ][]string {"eid" : {}}, nil ).Times (1 )
13621362 ec2Svc .EXPECT ().GetCoreSecurityGroups (gomock .Any ()).Return ([]string {}, nil ).Times (1 )
13631363 ec2Svc .EXPECT ().GetAdditionalSecurityGroupsIDs (gomock .Any ()).Return (nil , nil )
@@ -1392,7 +1392,7 @@ func TestAWSMachineReconciler(t *testing.T) {
13921392 presigned := "https://cluster-api-aws.s3.us-west-2.amazonaws.com/bootstrap-data.yaml?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIA3SGQVQG7FGA6KKA6%2F20221104%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20221104T140227Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=b228dbec8c1008c80c162e1210e4503dceead1e4d4751b4d9787314fd6da4d55"
13931393
13941394 objectStoreSvc .EXPECT ().Create (gomock .Any (), gomock .Any (), gomock .Any ()).Return (presigned , nil ).Times (1 )
1395- ec2Svc .EXPECT ().CreateInstance (gomock .Any (), gomock .Any (), gomock .Any ()).Return (instance , nil ).AnyTimes ()
1395+ ec2Svc .EXPECT ().CreateInstance (gomock .Any (), gomock .Any (), gomock .Any (), gomock . Any () ).Return (instance , nil ).AnyTimes ()
13961396 ec2Svc .EXPECT ().GetInstanceSecurityGroups (gomock .Any ()).Return (map [string ][]string {"eid" : {}}, nil ).Times (1 )
13971397 ec2Svc .EXPECT ().GetCoreSecurityGroups (gomock .Any ()).Return ([]string {}, nil ).Times (1 )
13981398 ec2Svc .EXPECT ().GetAdditionalSecurityGroupsIDs (gomock .Any ()).Return (nil , nil )
@@ -1611,7 +1611,7 @@ func TestAWSMachineReconciler(t *testing.T) {
16111611 // Expect no Cluster Object Store to be created.
16121612 objectStoreSvc .EXPECT ().Create (gomock .Any (), gomock .Any (), gomock .Any ()).Return (fakeS3URL , nil ).Times (0 )
16131613
1614- ec2Svc .EXPECT ().CreateInstance (gomock .Any (), gomock .Any (), gomock .Any ()).Return (instance , nil ).AnyTimes ()
1614+ ec2Svc .EXPECT ().CreateInstance (gomock .Any (), gomock .Any (), gomock .Any (), gomock . Any () ).Return (instance , nil ).AnyTimes ()
16151615 ec2Svc .EXPECT ().GetInstanceSecurityGroups (gomock .Any ()).Return (map [string ][]string {"eid" : {}}, nil ).Times (1 )
16161616 ec2Svc .EXPECT ().GetCoreSecurityGroups (gomock .Any ()).Return ([]string {}, nil ).Times (1 )
16171617 ec2Svc .EXPECT ().GetAdditionalSecurityGroupsIDs (gomock .Any ()).Return (nil , nil )
0 commit comments