Skip to content

{AKS} Update test related command output#19115

Merged
zhoxing-ms merged 8 commits intoAzure:devfrom
FumingZhang:fuming/fix-check-acr
Aug 11, 2021
Merged

{AKS} Update test related command output#19115
zhoxing-ms merged 8 commits intoAzure:devfrom
FumingZhang:fuming/fix-check-acr

Conversation

@FumingZhang
Copy link
Copy Markdown
Member

Description

Update test related command output.

Testing Guide

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.

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Aug 4, 2021

AKS

@yonzhan yonzhan requested review from Juliehzl and zhoxing-ms August 4, 2021 04:07
@yonzhan yonzhan added this to the Aug 2021 (2021-09-07) milestone Aug 4, 2021
@yonzhan yonzhan requested a review from jsntcy August 4, 2021 04:09
@FumingZhang FumingZhang marked this pull request as ready for review August 4, 2021 06:05
@FumingZhang FumingZhang force-pushed the fuming/fix-check-acr branch from 9c1a437 to 1cea26e Compare August 6, 2021 01:33
Comment on lines +129 to +136
def get_cmd_test_hook_data(filename):
hook_data = ""
curr_dir = os.path.dirname(os.path.realpath(__file__))
test_hook_file_path = os.path.join(curr_dir, 'tests/latest/data', filename)
if os.path.exists(test_hook_file_path):
with open(test_hook_file_path, "r") as f:
hook_data = json.load(f)
return hook_data
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a little curious, what is the function of this file?

Copy link
Copy Markdown
Member Author

@FumingZhang FumingZhang Aug 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

During testing, the test case will create a hook file. If this file is detected in the corresponding command implementation, it will perform some different operations than usual.

At present, the above process is only used in the aks browse sub-command and the corresponding test_aks_browse_legacy test case. Since the command implementation of aks browse will never exit by default (exit via CTRL+C), this method is used to add a timeout option to the command to exit after a preset period of time during testing.

@zhoxing-ms zhoxing-ms merged commit b39b22f into Azure:dev Aug 11, 2021
@FumingZhang FumingZhang deleted the fuming/fix-check-acr branch August 11, 2021 07:49
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.

4 participants