leapp-repository icon indicating copy to clipboard operation
leapp-repository copied to clipboard

Unify the way we test logging messages

Open zhukovgreen opened this issue 4 years ago • 1 comments

With the PR #493 we introduced a new, better, way to test logging messages with the help of https://docs.pytest.org/en/latest/logging.html#caplog-fixture

Example of test using the caplog is, for example, here: https://github.com/oamg/leapp-repository/blob/506a906c0e4496ea89dce0f9269851064b7bdb75/repos/system_upgrade/el7toel8/actors/sctpconfigread/tests/test_unit_sctpconfigread_sctplib.py#L160-L163%29

Acceptance criteria:

  • [ ] Adopt new way in existing code, so we have only one way to test logger functionality
  • [ ] Remove mocked_logger from https://github.com/oamg/leapp-repository/blob/73d328f898c524b82681769108f7b2bdf45563ba/repos/system_upgrade/el7toel8/libraries/testutils.py#L32

zhukovgreen avatar Apr 29 '20 08:04 zhukovgreen