Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pulling the Environment from the Azure CLI config #842

Merged
merged 1 commit into from
Feb 15, 2018
Merged

Commits on Feb 15, 2018

  1. Pulling the environment from the Azure CLI config

    Fixes #662. Tests pass
    
    ```
    $ go test -v
    === RUN   TestAzureFindValidAccessTokenForTenant_InvalidDate
    --- PASS: TestAzureFindValidAccessTokenForTenant_InvalidDate (0.00s)
    === RUN   TestAzureFindValidAccessTokenForTenant_Expired
    2018/02/15 08:51:40 [DEBUG] Token "7cabcf30-8dca-43f9-91e6-fd56dfb8632f" has expired
    --- PASS: TestAzureFindValidAccessTokenForTenant_Expired (0.00s)
    === RUN   TestAzureFindValidAccessTokenForTenant_ExpiringIn
    --- PASS: TestAzureFindValidAccessTokenForTenant_ExpiringIn (0.00s)
    === RUN   TestAzureFindValidAccessTokenForTenant_InvalidManagementDomain
    2018/02/15 08:51:40 [DEBUG] Resource "https://portal.azure.com/" isn't a management domain
    --- PASS: TestAzureFindValidAccessTokenForTenant_InvalidManagementDomain (0.00s)
    === RUN   TestAzureFindValidAccessTokenForTenant_DifferentTenant
    2018/02/15 08:51:40 [DEBUG] Resource "https://management.core.windows.net/" isn't for the correct Tenant
    --- PASS: TestAzureFindValidAccessTokenForTenant_DifferentTenant (0.00s)
    === RUN   TestAzureFindValidAccessTokenForTenant_ValidFromCloudShell
    --- PASS: TestAzureFindValidAccessTokenForTenant_ValidFromCloudShell (0.00s)
    === RUN   TestAzureFindValidAccessTokenForTenant_ValidFromAzureCLI
    --- PASS: TestAzureFindValidAccessTokenForTenant_ValidFromAzureCLI (0.00s)
    === RUN   TestAzureFindValidAccessTokenForTenant_NoTokens
    --- PASS: TestAzureFindValidAccessTokenForTenant_NoTokens (0.00s)
    === RUN   TestAzureCLIProfileFindDefaultSubscription
    --- PASS: TestAzureCLIProfileFindDefaultSubscription (0.00s)
    === RUN   TestAzureCLIProfileFindSubscription
    --- PASS: TestAzureCLIProfileFindSubscription (0.00s)
    === RUN   TestAzurePopulateSubscriptionFromCLIProfile_Missing
    --- PASS: TestAzurePopulateSubscriptionFromCLIProfile_Missing (0.00s)
    === RUN   TestAzurePopulateSubscriptionFromCLIProfile_NoDefault
    --- PASS: TestAzurePopulateSubscriptionFromCLIProfile_NoDefault (0.00s)
    === RUN   TestAzurePopulateSubscriptionFromCLIProfile_Default
    --- PASS: TestAzurePopulateSubscriptionFromCLIProfile_Default (0.00s)
    === RUN   TestAzurePopulateTenantFromCLIProfile_Empty
    --- PASS: TestAzurePopulateTenantFromCLIProfile_Empty (0.00s)
    === RUN   TestAzurePopulateTenantFromCLIProfile_MissingSubscription
    --- PASS: TestAzurePopulateTenantFromCLIProfile_MissingSubscription (0.00s)
    === RUN   TestAzurePopulateTenantFromCLIProfile_PopulateTenantId
    --- PASS: TestAzurePopulateTenantFromCLIProfile_PopulateTenantId (0.00s)
    === RUN   TestAzurePopulateTenantFromCLIProfile_Complete
    --- PASS: TestAzurePopulateTenantFromCLIProfile_Complete (0.00s)
    === RUN   TestAzurePopulateFromAccessToken_Missing
    --- PASS: TestAzurePopulateFromAccessToken_Missing (0.00s)
    === RUN   TestAzurePopulateFromAccessToken_Exists
    --- PASS: TestAzurePopulateFromAccessToken_Exists (0.00s)
    === RUN   TestAzureEnvironmentNames
    --- PASS: TestAzureEnvironmentNames (0.00s)
    === RUN   TestAzureValidateBearerAuth
    --- PASS: TestAzureValidateBearerAuth (0.00s)
    === RUN   TestAzureValidateServicePrincipal
    --- PASS: TestAzureValidateServicePrincipal (0.00s)
    PASS
    ok  	github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/authentication	0.018s
    ```
    tombuildsstuff committed Feb 15, 2018
    Configuration menu
    Copy the full SHA
    d42caca View commit details
    Browse the repository at this point in the history