]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
cephadm: patch the `cephadm.logger` class
authorMichael Fritch <mfritch@suse.com>
Tue, 20 Sep 2022 22:20:15 +0000 (16:20 -0600)
committerMichael Fritch <mfritch@suse.com>
Wed, 21 Sep 2022 19:08:21 +0000 (13:08 -0600)
commitf7f369e85e730b857f89c831bd59f6588b95da86
tree97508088d48bb31d7788d79b01e3eef218cb9bfb
parent2c09efbab641c0845a1b8801f0eb804312dcf360
cephadm: patch the `cephadm.logger` class

Patch the logger class instead of globally mocking the class from within
the loaded source file. This was inadvertently allowing for the entire
test run to succeed, while a single run of a test case would fail due to
the missing mock.

For example:
    `tox -e py3 tests/test_cephadm.py::TestShell::test_fsid`

Fixes: Fixes: https://tracker.ceph.com/issues/57621
Signed-off-by: Michael Fritch <mfritch@suse.com>
src/cephadm/tests/fixtures.py
src/cephadm/tests/test_cephadm.py