@@ -123,7 +123,7 @@ func TestAccBackendOIDCBasic(t *testing.T) {
123123 backend .TestBackendStates (t , b )
124124}
125125
126- func TestAccBackendADALAzureADAuthBasic (t * testing.T ) {
126+ func TestAccBackendAzureADAuthBasic (t * testing.T ) {
127127 testAccAzureBackend (t )
128128 rs := acctest .RandString (4 )
129129 res := testResourceNames (rs , "testState" )
@@ -151,7 +151,7 @@ func TestAccBackendADALAzureADAuthBasic(t *testing.T) {
151151 backend .TestBackendStates (t , b )
152152}
153153
154- func TestAccBackendADALManagedServiceIdentityBasic (t * testing.T ) {
154+ func TestAccBackendManagedServiceIdentityBasic (t * testing.T ) {
155155 testAccAzureBackendRunningInAzure (t )
156156 rs := acctest .RandString (4 )
157157 res := testResourceNames (rs , "testState" )
@@ -179,7 +179,7 @@ func TestAccBackendADALManagedServiceIdentityBasic(t *testing.T) {
179179 backend .TestBackendStates (t , b )
180180}
181181
182- func TestAccBackendADALServicePrincipalClientCertificateBasic (t * testing.T ) {
182+ func TestAccBackendServicePrincipalClientCertificateBasic (t * testing.T ) {
183183 testAccAzureBackend (t )
184184
185185 clientCertPassword := os .Getenv ("ARM_CLIENT_CERTIFICATE_PASSWORD" )
@@ -216,7 +216,7 @@ func TestAccBackendADALServicePrincipalClientCertificateBasic(t *testing.T) {
216216 backend .TestBackendStates (t , b )
217217}
218218
219- func TestAccBackendADALServicePrincipalClientSecretBasic (t * testing.T ) {
219+ func TestAccBackendServicePrincipalClientSecretBasic (t * testing.T ) {
220220 testAccAzureBackend (t )
221221 rs := acctest .RandString (4 )
222222 res := testResourceNames (rs , "testState" )
@@ -245,7 +245,7 @@ func TestAccBackendADALServicePrincipalClientSecretBasic(t *testing.T) {
245245 backend .TestBackendStates (t , b )
246246}
247247
248- func TestAccBackendADALServicePrincipalClientSecretCustomEndpoint (t * testing.T ) {
248+ func TestAccBackendServicePrincipalClientSecretCustomEndpoint (t * testing.T ) {
249249 testAccAzureBackend (t )
250250
251251 // this is only applicable for Azure Stack.
@@ -281,169 +281,6 @@ func TestAccBackendADALServicePrincipalClientSecretCustomEndpoint(t *testing.T)
281281 backend .TestBackendStates (t , b )
282282}
283283
284- func TestAccBackendMSALAzureADAuthBasic (t * testing.T ) {
285- testAccAzureBackend (t )
286- rs := acctest .RandString (4 )
287- res := testResourceNames (rs , "testState" )
288- res .useAzureADAuth = true
289- res .useMicrosoftGraph = true
290- armClient := buildTestClient (t , res )
291-
292- ctx := context .TODO ()
293- err := armClient .buildTestResources (ctx , & res )
294- defer armClient .destroyTestResources (ctx , res )
295- if err != nil {
296- armClient .destroyTestResources (ctx , res )
297- t .Fatalf ("Error creating Test Resources: %q" , err )
298- }
299-
300- b := backend .TestBackendConfig (t , New (), backend .TestWrapConfig (map [string ]interface {}{
301- "storage_account_name" : res .storageAccountName ,
302- "container_name" : res .storageContainerName ,
303- "key" : res .storageKeyName ,
304- "access_key" : res .storageAccountAccessKey ,
305- "environment" : os .Getenv ("ARM_ENVIRONMENT" ),
306- "endpoint" : os .Getenv ("ARM_ENDPOINT" ),
307- "use_azuread_auth" : true ,
308- })).(* Backend )
309-
310- backend .TestBackendStates (t , b )
311- }
312-
313- func TestAccBackendMSALManagedServiceIdentityBasic (t * testing.T ) {
314- testAccAzureBackendRunningInAzure (t )
315- rs := acctest .RandString (4 )
316- res := testResourceNames (rs , "testState" )
317- res .useMicrosoftGraph = true
318- armClient := buildTestClient (t , res )
319-
320- ctx := context .TODO ()
321- err := armClient .buildTestResources (ctx , & res )
322- defer armClient .destroyTestResources (ctx , res )
323- if err != nil {
324- t .Fatalf ("Error creating Test Resources: %q" , err )
325- }
326-
327- b := backend .TestBackendConfig (t , New (), backend .TestWrapConfig (map [string ]interface {}{
328- "storage_account_name" : res .storageAccountName ,
329- "container_name" : res .storageContainerName ,
330- "key" : res .storageKeyName ,
331- "resource_group_name" : res .resourceGroup ,
332- "use_msi" : true ,
333- "subscription_id" : os .Getenv ("ARM_SUBSCRIPTION_ID" ),
334- "tenant_id" : os .Getenv ("ARM_TENANT_ID" ),
335- "environment" : os .Getenv ("ARM_ENVIRONMENT" ),
336- "endpoint" : os .Getenv ("ARM_ENDPOINT" ),
337- })).(* Backend )
338-
339- backend .TestBackendStates (t , b )
340- }
341-
342- func TestAccBackendMSALServicePrincipalClientCertificateBasic (t * testing.T ) {
343- testAccAzureBackend (t )
344-
345- clientCertPassword := os .Getenv ("ARM_CLIENT_CERTIFICATE_PASSWORD" )
346- clientCertPath := os .Getenv ("ARM_CLIENT_CERTIFICATE_PATH" )
347- if clientCertPath == "" {
348- t .Skip ("Skipping since `ARM_CLIENT_CERTIFICATE_PATH` is not specified!" )
349- }
350-
351- rs := acctest .RandString (4 )
352- res := testResourceNames (rs , "testState" )
353- res .useMicrosoftGraph = true
354- armClient := buildTestClient (t , res )
355-
356- ctx := context .TODO ()
357- err := armClient .buildTestResources (ctx , & res )
358- defer armClient .destroyTestResources (ctx , res )
359- if err != nil {
360- t .Fatalf ("Error creating Test Resources: %q" , err )
361- }
362-
363- b := backend .TestBackendConfig (t , New (), backend .TestWrapConfig (map [string ]interface {}{
364- "storage_account_name" : res .storageAccountName ,
365- "container_name" : res .storageContainerName ,
366- "key" : res .storageKeyName ,
367- "resource_group_name" : res .resourceGroup ,
368- "subscription_id" : os .Getenv ("ARM_SUBSCRIPTION_ID" ),
369- "tenant_id" : os .Getenv ("ARM_TENANT_ID" ),
370- "client_id" : os .Getenv ("ARM_CLIENT_ID" ),
371- "client_certificate_password" : clientCertPassword ,
372- "client_certificate_path" : clientCertPath ,
373- "environment" : os .Getenv ("ARM_ENVIRONMENT" ),
374- "endpoint" : os .Getenv ("ARM_ENDPOINT" ),
375- })).(* Backend )
376-
377- backend .TestBackendStates (t , b )
378- }
379-
380- func TestAccBackendMSALServicePrincipalClientSecretBasic (t * testing.T ) {
381- testAccAzureBackend (t )
382- rs := acctest .RandString (4 )
383- res := testResourceNames (rs , "testState" )
384- res .useMicrosoftGraph = true
385- armClient := buildTestClient (t , res )
386-
387- ctx := context .TODO ()
388- err := armClient .buildTestResources (ctx , & res )
389- defer armClient .destroyTestResources (ctx , res )
390- if err != nil {
391- t .Fatalf ("Error creating Test Resources: %q" , err )
392- }
393-
394- b := backend .TestBackendConfig (t , New (), backend .TestWrapConfig (map [string ]interface {}{
395- "storage_account_name" : res .storageAccountName ,
396- "container_name" : res .storageContainerName ,
397- "key" : res .storageKeyName ,
398- "resource_group_name" : res .resourceGroup ,
399- "subscription_id" : os .Getenv ("ARM_SUBSCRIPTION_ID" ),
400- "tenant_id" : os .Getenv ("ARM_TENANT_ID" ),
401- "client_id" : os .Getenv ("ARM_CLIENT_ID" ),
402- "client_secret" : os .Getenv ("ARM_CLIENT_SECRET" ),
403- "environment" : os .Getenv ("ARM_ENVIRONMENT" ),
404- "endpoint" : os .Getenv ("ARM_ENDPOINT" ),
405- })).(* Backend )
406-
407- backend .TestBackendStates (t , b )
408- }
409-
410- func TestAccBackendMSALServicePrincipalClientSecretCustomEndpoint (t * testing.T ) {
411- testAccAzureBackend (t )
412-
413- // this is only applicable for Azure Stack.
414- endpoint := os .Getenv ("ARM_ENDPOINT" )
415- if endpoint == "" {
416- t .Skip ("Skipping as ARM_ENDPOINT isn't configured" )
417- }
418-
419- rs := acctest .RandString (4 )
420- res := testResourceNames (rs , "testState" )
421- res .useMicrosoftGraph = true
422- armClient := buildTestClient (t , res )
423-
424- ctx := context .TODO ()
425- err := armClient .buildTestResources (ctx , & res )
426- defer armClient .destroyTestResources (ctx , res )
427- if err != nil {
428- t .Fatalf ("Error creating Test Resources: %q" , err )
429- }
430-
431- b := backend .TestBackendConfig (t , New (), backend .TestWrapConfig (map [string ]interface {}{
432- "storage_account_name" : res .storageAccountName ,
433- "container_name" : res .storageContainerName ,
434- "key" : res .storageKeyName ,
435- "resource_group_name" : res .resourceGroup ,
436- "subscription_id" : os .Getenv ("ARM_SUBSCRIPTION_ID" ),
437- "tenant_id" : os .Getenv ("ARM_TENANT_ID" ),
438- "client_id" : os .Getenv ("ARM_CLIENT_ID" ),
439- "client_secret" : os .Getenv ("ARM_CLIENT_SECRET" ),
440- "environment" : os .Getenv ("ARM_ENVIRONMENT" ),
441- "endpoint" : endpoint ,
442- })).(* Backend )
443-
444- backend .TestBackendStates (t , b )
445- }
446-
447284func TestAccBackendAccessKeyLocked (t * testing.T ) {
448285 testAccAzureBackend (t )
449286 rs := acctest .RandString (4 )
0 commit comments