Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(test): only check initial prefix for missing/extra resource names #477

Merged
merged 1 commit into from
Jan 15, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion azext_edge/tests/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ def find_extra_or_missing_names(
ignore_missing: bool = False,
):
error_msg = []
# expected_names might contains descriptor, if so, remove it
# names may contain descriptors after the initial '.', just comparing first prefix
expected_names = [name.split(".")[0] for name in expected_names]
result_names = [name.split(".")[0] for name in result_names]
extra_names = [name for name in result_names if name not in expected_names]
if extra_names:
msg = f"Extra {resource_type} names: {', '.join(extra_names)}."
Expand Down
Loading