Ensure offline DefaultAzureCredential tests pass during live runs#8777
Merged
Ensure offline DefaultAzureCredential tests pass during live runs#8777
Conversation
|
Can one of the admins verify this patch? |
bryevdv
approved these changes
Nov 21, 2019
KieranBrantnerMagee
approved these changes
Nov 21, 2019
openapi-sdkautomation-test bot
pushed a commit
to openapi-env-test/azure-sdk-for-python
that referenced
this pull request
Mar 24, 2020
Merge branch 'master' of https://github.com/Azure/azure-rest-api-specs into keyvault_multiapi_readme * 'master' of https://github.com/Azure/azure-rest-api-specs: (101 commits) add cli.md for automation (Azure#8411) adjust assignment (Azure#8782) Remove Microsoft.Backup.Admin 2016-05-01 API version (Azure#8588) Updating global setting in PostgreSQL/MySQL readme file (Azure#8777) update package name and output folder in readme.typescript.md (Azure#8764) add package-2019-12 python define (Azure#8769) Fix Parameter Description for validate resource move (Azure#8524) Edit pass for GA swagger (Azure#8759) Update proxy.json (Azure#8596) Model enums that may change in the future as strings (Azure#8760) Add api-version 2019-11-01 for resources/subscriptions (Azure#8728) regenerated all-api-versions PrivateLinkResources for Microsoft.Automation (Azure#8369) add cli.md for serialconsole (Azure#8401) add cli.md for mariadb (Azure#8466) [Computer Vision] Create CV API v3.0-preview (Azure#7402) Publish Microsoft.ContainerService api-version 2020-03-01 (Azure#8756) Update swagger based on auto-gen process change. (Azure#8766) add assignment-bot config (Azure#8716) add tag package-2019-12 to batch (Azure#8751) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This changes offline
DefaultAzureCredentialtests to use environment variables to set arbitrary values where appropriate.For example, to test the behavior of
shared_cache_username, we populate a cache with mock accounts whose tenants are arbitrary (but identical). When running the full live test suite,$AZURE_TENANT_IDwill have a value whichDefaultAzureCredentialwill pass toSharedCacheCredential, as it should. If this value doesn't match the arbitrary tenant of the mock accounts, the test will fail despite the correctness of the code under test because no cached account will match both the explicitly specified username and the implicitly specified tenant.