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

test: Fix silent swallowing of unexpected subp error #4702

Merged
merged 1 commit into from
Dec 15, 2023

Conversation

TheRealFalcon
Copy link
Member

@TheRealFalcon TheRealFalcon commented Dec 14, 2023

Proposed Commit Message

test: Fix silent swallowing of unexpected subp error

We throw an error when supb isn't mocked in a test. However, there
are many broad exception handlers that wind up swallowing the error.
This commit changes it from an AssertionError to a new error that
inherits from BaseException so that it doesn't get silently swallowed.

Also fix any tests that are impacted.

Additional Context

Merge type

  • Squash merge using "Proposed Commit Message"
  • Rebase and merge unique commits. Requires commit messages per-commit each referencing the pull request number (#<PR_NUM>)

We throw an error when supb isn't mocked in a test. However, there
are many broad exception handlers that wind up swallowing the error.
This commit changes it from an AssertionError to a new error that
inherits from BaseException so that it doesn't get silently swallowed.

Also fix any tests that are impacted.
@TheRealFalcon
Copy link
Member Author

cc @cjp256 because a number of Azure tests are affected

Copy link
Contributor

@aciba90 aciba90 left a comment

Choose a reason for hiding this comment

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

LGTM!

@cjp256
Copy link
Contributor

cjp256 commented Dec 15, 2023

cc @cjp256 because a number of Azure tests are affected

Thanks! There is the fake_vm_id fixture which probably should be used for the Azure tests. But I can update separately.

LGTM

@TheRealFalcon TheRealFalcon merged commit c698d8e into canonical:main Dec 15, 2023
29 checks passed
@TheRealFalcon TheRealFalcon deleted the fix-disable-subp branch December 15, 2023 21:38
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.

3 participants