@@ -41,67 +41,67 @@ func TestAzureMachine_ValidateCreate(t *testing.T) {
4141 }{
4242 {
4343 name : "azuremachine with marketplace image - full" ,
44- machine : createMachineWithtMarketPlaceImage (t , "PUB1234" , "OFFER1234" , "SKU1234" , "1.0.0" ),
44+ machine : createMachineWithtMarketPlaceImage ("PUB1234" , "OFFER1234" , "SKU1234" , "1.0.0" ),
4545 wantErr : false ,
4646 },
4747 {
4848 name : "azuremachine with marketplace image - missing publisher" ,
49- machine : createMachineWithtMarketPlaceImage (t , "" , "OFFER1234 " , "SKU1234 " , "1 .0.0" ),
49+ machine : createMachineWithtMarketPlaceImage ("" , "OFFER1235 " , "SKU1235 " , "2 .0.0" ),
5050 wantErr : true ,
5151 },
5252 {
5353 name : "azuremachine with shared gallery image - full" ,
54- machine : createMachineWithSharedImage (t , "SUB123" , "RG123" , "NAME123" , "GALLERY1" , "1.0.0" ),
54+ machine : createMachineWithSharedImage ("SUB123" , "RG123" , "NAME123" , "GALLERY1" , "1.0.0" ),
5555 wantErr : false ,
5656 },
5757 {
5858 name : "azuremachine with marketplace image - missing subscription" ,
59- machine : createMachineWithSharedImage (t , "" , "RG123 " , "NAME123 " , "GALLERY1" , "1 .0.0" ),
59+ machine : createMachineWithSharedImage ("" , "RG124 " , "NAME124 " , "GALLERY1" , "2 .0.0" ),
6060 wantErr : true ,
6161 },
6262 {
6363 name : "azuremachine with image by - with id" ,
64- machine : createMachineWithImageByID (t , "ID123" ),
64+ machine : createMachineWithImageByID ("ID123" ),
6565 wantErr : false ,
6666 },
6767 {
6868 name : "azuremachine with image by - without id" ,
69- machine : createMachineWithImageByID (t , "" ),
69+ machine : createMachineWithImageByID ("" ),
7070 wantErr : true ,
7171 },
7272 {
7373 name : "azuremachine with valid SSHPublicKey" ,
74- machine : createMachineWithSSHPublicKey (t , validSSHPublicKey ),
74+ machine : createMachineWithSSHPublicKey (validSSHPublicKey ),
7575 wantErr : false ,
7676 },
7777 {
7878 name : "azuremachine without SSHPublicKey" ,
79- machine : createMachineWithSSHPublicKey (t , "" ),
79+ machine : createMachineWithSSHPublicKey ("" ),
8080 wantErr : true ,
8181 },
8282 {
8383 name : "azuremachine with invalid SSHPublicKey" ,
84- machine : createMachineWithSSHPublicKey (t , "invalid ssh key" ),
84+ machine : createMachineWithSSHPublicKey ("invalid ssh key" ),
8585 wantErr : true ,
8686 },
8787 {
8888 name : "azuremachine with list of user-assigned identities" ,
89- machine : createMachineWithUserAssignedIdentities (t , []UserAssignedIdentity {{ProviderID : "azure:///123" }, {ProviderID : "azure:///456" }}),
89+ machine : createMachineWithUserAssignedIdentities ([]UserAssignedIdentity {{ProviderID : "azure:///123" }, {ProviderID : "azure:///456" }}),
9090 wantErr : false ,
9191 },
9292 {
9393 name : "azuremachine with empty list of user-assigned identities" ,
94- machine : createMachineWithUserAssignedIdentities (t , []UserAssignedIdentity {}),
94+ machine : createMachineWithUserAssignedIdentities ([]UserAssignedIdentity {}),
9595 wantErr : true ,
9696 },
9797 {
9898 name : "azuremachine with valid osDisk cache type" ,
99- machine : createMachineWithOsDiskCacheType (t , string (compute .PossibleCachingTypesValues ()[1 ])),
99+ machine : createMachineWithOsDiskCacheType (string (compute .PossibleCachingTypesValues ()[1 ])),
100100 wantErr : false ,
101101 },
102102 {
103103 name : "azuremachine with invalid osDisk cache type" ,
104- machine : createMachineWithOsDiskCacheType (t , "invalid_cache_type" ),
104+ machine : createMachineWithOsDiskCacheType ("invalid_cache_type" ),
105105 wantErr : true ,
106106 },
107107 }
@@ -531,8 +531,8 @@ func TestAzureMachine_Default(t *testing.T) {
531531 }
532532
533533 existingPublicKey := validSSHPublicKey
534- publicKeyExistTest := test {machine : createMachineWithSSHPublicKey (t , existingPublicKey )}
535- publicKeyNotExistTest := test {machine : createMachineWithSSHPublicKey (t , "" )}
534+ publicKeyExistTest := test {machine : createMachineWithSSHPublicKey (existingPublicKey )}
535+ publicKeyNotExistTest := test {machine : createMachineWithSSHPublicKey ("" )}
536536
537537 publicKeyExistTest .machine .Default ()
538538 g .Expect (publicKeyExistTest .machine .Spec .SSHPublicKey ).To (Equal (existingPublicKey ))
@@ -551,7 +551,7 @@ func TestAzureMachine_Default(t *testing.T) {
551551 }
552552}
553553
554- func createMachineWithSharedImage (t * testing. T , subscriptionID , resourceGroup , name , gallery , version string ) * AzureMachine {
554+ func createMachineWithSharedImage (subscriptionID , resourceGroup , name , gallery , version string ) * AzureMachine {
555555 image := & Image {
556556 SharedGallery : & AzureSharedGalleryImage {
557557 SubscriptionID : subscriptionID ,
@@ -571,7 +571,7 @@ func createMachineWithSharedImage(t *testing.T, subscriptionID, resourceGroup, n
571571 }
572572}
573573
574- func createMachineWithtMarketPlaceImage (t * testing. T , publisher , offer , sku , version string ) * AzureMachine {
574+ func createMachineWithtMarketPlaceImage (publisher , offer , sku , version string ) * AzureMachine {
575575 image := & Image {
576576 Marketplace : & AzureMarketplaceImage {
577577 Publisher : publisher ,
@@ -590,7 +590,7 @@ func createMachineWithtMarketPlaceImage(t *testing.T, publisher, offer, sku, ver
590590 }
591591}
592592
593- func createMachineWithImageByID (t * testing. T , imageID string ) * AzureMachine {
593+ func createMachineWithImageByID (imageID string ) * AzureMachine {
594594 image := & Image {
595595 ID : & imageID ,
596596 }
@@ -604,7 +604,7 @@ func createMachineWithImageByID(t *testing.T, imageID string) *AzureMachine {
604604 }
605605}
606606
607- func createMachineWithOsDiskCacheType (t * testing. T , cacheType string ) * AzureMachine {
607+ func createMachineWithOsDiskCacheType (cacheType string ) * AzureMachine {
608608 machine := & AzureMachine {
609609 Spec : AzureMachineSpec {
610610 SSHPublicKey : validSSHPublicKey ,
0 commit comments