canonical / hotsos

Software analysis toolkit. Define checks in high-level language and leverage library to perform analysis of common Cloud applications.
Apache License 2.0
30 stars 37 forks source link

Catch and verify log calls #898

Closed brianphaley closed 3 weeks ago

brianphaley commented 4 weeks ago

There are some tests for invalid data that cause either log.warning() or log.error() to be called. In order to not pollute test output (these are shown in RED), mock the calls and actually verify they were called.

In the case of template-generated tests, just mock the log call to prevent the output.

TrivialFix