Skip to content

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

Open
@TeddyAndrieux

Description

@TeddyAndrieux

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    complexity:mediumSomething that requires one or few days to fixkind:debtTechnical debtpriority:mediumMedium priority issues, should only be postponed if no other optiontopic:testsWhat's not tested may be broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions