Use mockery constructors in tests
What does this MR do?
Uses Mockery constructors
Why was this MR needed?
- No need to explicitly call
AssertExceptions()in tests - Reduces the chance of missing calling
AssertExceptions()- There was a few instances of this, and this caused the tests to no longer pass. These have been updated.
- There were some tests that had the correct setup, at least initially, but other tests now made it so the calls were not always performed. Easy way to rectify this situation was to use
.Maybe()
- Reduces how many
cleanup-type defer funcs we need. Where possible, these now uset.Cleanup().
What's the best way to test this MR?
What are the relevant issue numbers?
Closes #38832 (closed)
Edited by Arran Walker