-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed
Labels
ARMaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupTest Framework
Milestone
Description
The test test_resource_policyset will not re-record. It fails on Bad Request when trying to create the policy assignment with the newly created set-definition. The test has been marked with @live_only to unblock unrelated changes in Network.
There are two issues:
- The
policy assignment createstep in the test fails. - The command does not properly unwrap the error from the service. Running the command manually with
--debugI got the following error trace:
msrest.http_logger : b'{"error":{"code":"InvalidPolicySku","message":"The policy assignment \'<null>\' is
invalid because it references a policy set definition (\'/subscriptions/0b1f6471-1bf0-4dda-aec3-
cb9272f09590/providers/Microsoft.Authorization/policySetDefinitions/test-policy1\') and has missing or
unsupported Sku: \'{\\"name\\":\\"A0\\",\\"tier\\":\\"Free\\"}\'. To assign a policy set definition, use one
of the following SKUs which support this feature: \'[{\\"name\\":\\"A1\\",\\"tier\\":\\"Standard\\"}]\'."}}'
msrest.exceptions : Operation returned an invalid status code 'Bad Request'
So the test should be fixed, but also the exception handler should be fixed to unwrap and expose this error.
Environment summary
Install Method (e.g. pip, interactive script, apt-get, Docker, MSI, edge build) / CLI version (az --version) / OS version / Shell Type (e.g. bash, cmd.exe, Bash on Windows)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
ARMaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupaz resource/group/lock/tag/deployment/policy/managementapp/account management-groupTest Framework