Skip to content

Conversation

@haroldrandom
Copy link
Contributor

@haroldrandom haroldrandom commented Apr 23, 2020

Description
Make tests of src/azure-cli-core/azure/cli/core/tests/test_help.py complete pass core under different profiles.

Currently, jobs like Automation Test running under different profiles didn't run with azure-cli-core module, which is incomplete for our tests and it would fail if running under 2019 and 2017 profiles.

I discovered it with the latest change on azdev Azure/azure-cli-dev-tools#188, and the tests src/azure-cli-core/azure/cli/core/tests/test_help.py::TestHelpLoads would fail if running under profile 2019-03-01-hybrid beause of the help entries would behave differently under 2019 and 2017 profiles but the tests are expected to assert everything under every profile.
That's why they failed.

Testing Guide
On original branch, switch to other 2019-03-01-hybrid profile:
az cloud update --profile 2019-03-01-hybrid,
then run tests with:
pytest -x -v --log-level=WARN src/azure-cli-core/azure/cli/core/tests/test_help.py::TestHelpLoads
the 4 tests under this test Class should fail.

After checking out my changes,
run it again, the 4 tests should pass.

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 added Test Framework Core CLI core infrastructure labels Apr 23, 2020
@haroldrandom haroldrandom added this to the S169 - For Build milestone Apr 23, 2020
@haroldrandom haroldrandom self-assigned this Apr 23, 2020
@yonzhan
Copy link
Collaborator

yonzhan commented Apr 23, 2020

add to S169

@yonzhan yonzhan requested review from jsntcy and mmyyrroonn April 23, 2020 13:27
@haroldrandom haroldrandom marked this pull request as ready for review April 24, 2020 03:07
@haroldrandom haroldrandom merged commit 4a58bcb into Azure:dev Apr 24, 2020
@haroldrandom haroldrandom deleted the fix-core-test-profiles branch April 24, 2020 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Core CLI core infrastructure Test Framework

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants