Skip to content

Conversation

@haroldrandom
Copy link
Contributor

@haroldrandom haroldrandom commented Apr 26, 2020

Description
The test test_resource_policyset under profile 2018-03-01-hybrid is invalid, because of its maxmium API version for policy is 2016-12-01 :

'2018-03-01-hybrid': {
ResourceType.MGMT_STORAGE: '2016-01-01',
ResourceType.MGMT_NETWORK: '2017-10-01',
ResourceType.MGMT_COMPUTE: SDKProfile('2017-03-30'),
ResourceType.MGMT_RESOURCE_LINKS: '2016-09-01',
ResourceType.MGMT_RESOURCE_LOCKS: '2016-09-01',
ResourceType.MGMT_RESOURCE_POLICY: '2016-12-01',

and the policy set-definition command wish to onboard only in API 2017-06-01-preview and higher:
with self.command_group('policy set-definition', resource_policy_set_definitions_sdk, resource_type=ResourceType.MGMT_RESOURCE_POLICY, min_api='2017-06-01-preview') as g:
g.custom_command('create', 'create_policy_setdefinition')
g.custom_command('delete', 'delete_policy_setdefinition')
g.custom_command('list', 'list_policy_setdefinition')
g.custom_show_command('show', 'get_policy_setdefinition')
g.custom_command('update', 'update_policy_setdefinition')

The test test_resoure_policyset is using the command group policy set-defintion, it's not correct.
Guessing it's added by mistake sicne the original migration.

Testing Guide
A small bug fix need to make, the decorator above test_resource_policyset need to change from AllowLargeResponse to AllowLargeResponse() then make the test to be correctly executed.

Then, run azdev test --live test_resource_policyset --profile 2018-03-01-hybrid it would fail.

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change.
[Component Name 2] az command b: Add some customer-facing feature.


This checklist is used to make sure that common guidelines for a pull request are followed.

@haroldrandom haroldrandom marked this pull request as ready for review April 26, 2020 03:35
@haroldrandom haroldrandom changed the title {Resource} Remove test test_resource_policyset from profile 2018-03-01-hybrid {Resource} Remove resource test test_resource_policyset from profile 2018-03-01-hybrid Apr 26, 2020
@haroldrandom haroldrandom merged commit d10679e into Azure:dev Apr 26, 2020
@haroldrandom haroldrandom deleted the remove-test-resource-policyset branch April 26, 2020 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants