-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[Identity] CAE b1 #17070
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
[Identity] CAE b1 #17070
Conversation
| self.kwargs = {} | ||
| self.test_resources_count = 0 | ||
|
|
||
| patch_main_exception_handler(self) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ScenarioTest (inherited from ReplayableTest) patches azure.cli.core.util.handle_exception so that the raw exception is thrown and can be captured by assertRaises. (handle_exception silences any exception.)
Do the same for LiveScenarioTest.
| endpoints=CloudEndpoints( | ||
| management='https://management.core.windows.net/', | ||
| resource_manager='https://management.azure.com/', | ||
| resource_manager='https://eastus2euap.management.azure.com/', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using canary ARM endpoint causes CI failure:
____________________ TestCloud.test_metadata_url_endpoints _____________________
self = <azure.cli.core.tests.test_cloud.TestCloud testMethod=test_metadata_url_endpoints>
@mock.patch.dict('os.environ', {'ARM_CLOUD_METADATA_URL': 'https://management.azure.com/metadata/endpoints?api-version=2019-05-01'})
def test_metadata_url_endpoints(self):
clouds = get_known_clouds(refresh=True)
for cloud in HARD_CODED_CLOUD_LIST:
metadata_url_cloud = next(c for c in clouds if c.name == cloud.name)
for k, v1 in cloud.endpoints.__dict__.items():
v2 = metadata_url_cloud.endpoints.__dict__[k]
if v1:
> self.assertEqual(v1.strip('/'), v2.strip('/'))
E AssertionError: 'https://eastus2euap.management.azure.com' != 'https://management.azure.com'
E - https://eastus2euap.management.azure.com
E ? ------------
E + https://management.azure.com
src/azure-cli-core/azure/cli/core/tests/test_cloud.py:260: AssertionError
This can't be fixed because
- There are tests like
test_metadata_url_endpointsusinghttps://management.azure.com. - All YAML recordings are based on
https://management.azure.com. Callinghttps://eastus2euap.management.azure.comwill cause mismatch during playback.
| UNAUTHORIZED_MESSAGE = ("The access token has expired or been revoked due to being blocked by Continuous Access " | ||
| "Evaluation. To re-authenticate, please run `az login`. " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding is continuous access evaluation just makes revoke happen before AT is expired. The statement can be "blocked by access policy" or "not meet the criteria to access this resource"
|
CAE |
# Conflicts: # src/azure-cli-core/azure/cli/core/azclierror.py # src/azure-cli-core/setup.py # src/azure-cli/requirements.py3.Darwin.txt # src/azure-cli/requirements.py3.Linux.txt # src/azure-cli/requirements.py3.windows.txt
Description
CAE beta support build upon
Testing Guide