[confcom] Add test for tar-based policy generation working even when Docker is unavailable#9864
[confcom] Add test for tar-based policy generation working even when Docker is unavailable#9864micromaomao wants to merge 2 commits into
Conversation
…Docker is unavailable Adds a unit test covering the regression fixed in Azure#9863: when generating a policy with `--tar` and the image is present in the tar, Docker must not be required. Agent-Logs-Url: https://github.com/micromaomao/azure-cli-extensions/sessions/f7739453-8606-43aa-b004-ac3d8edef47c Co-authored-by: micromaomao <6070533+micromaomao@users.noreply.github.com> Signed-off-by: Tingmao Wang <tingmaowang@microsoft.com>
|
Validation for Breaking Change Starting...
Thanks for your contribution! |
|
Hi @micromaomao, |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
|
Hi @micromaomao Release SuggestionsModule: confcom
Notes
|
There was a problem hiding this comment.
Pull request overview
Adds a regression unit test to ensure policy generation using --tar succeeds even if Docker client creation fails (covering the scenario fixed in PR #9863).
Changes:
- Add a new unittest that patches
docker.from_env()to raiseDockerExceptionand verifies policy population works when the image is supplied viatar_mapping. - Add test-only imports needed for mocking and raising Docker exceptions.
Adds a unit test covering the regression fixed in #9863: when generating a policy with
--tarand the image is present in the tar, Docker must not be required.Merge after #9863
Agent-Logs-Url: https://github.com/micromaomao/azure-cli-extensions/sessions/f7739453-8606-43aa-b004-ac3d8edef47c
Co-authored-by: micromaomao 6070533+micromaomao@users.noreply.github.com
Signed-off-by: Tingmao Wang tingmaowang@microsoft.com
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install wheel==0.30.0required)For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.jsonautomatically.You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify
src/index.json.