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

Check for __cause__ in Salt unit test when raising exceptions #3086

Open
TeddyAndrieux opened this issue Feb 5, 2021 · 0 comments
Open

Check for __cause__ in Salt unit test when raising exceptions #3086

TeddyAndrieux opened this issue Feb 5, 2021 · 0 comments
Labels
complexity:medium Something that requires one or few days to fix kind:debt Technical debt priority:medium Medium priority issues, should only be postponed if no other option topic:tests What's not tested may be broken

Comments

@TeddyAndrieux
Copy link
Collaborator

Component:

'salt', 'tests'

Why this is needed:

Since #3066 we start using raise <exception> from <cause> so in unit test currently we can only check the content of the last exception raised.

What should be done:

It could be interesting to check as well the cause of the last exception

Implementation proposal (strongly recommended):

Create a new assertRaisesSomething function that basically do the exact same as the assertRaisesRegex but also check the content of __cause__ of the exception

@TeddyAndrieux TeddyAndrieux added topic:tests What's not tested may be broken kind:debt Technical debt complexity:medium Something that requires one or few days to fix priority:medium Medium priority issues, should only be postponed if no other option labels Feb 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complexity:medium Something that requires one or few days to fix kind:debt Technical debt priority:medium Medium priority issues, should only be postponed if no other option topic:tests What's not tested may be broken
Projects
None yet
Development

No branches or pull requests

1 participant