]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
cephadm: update test to avoid using exception handling as an assertion
authorJohn Mulligan <jmulligan@redhat.com>
Thu, 28 Sep 2023 15:02:37 +0000 (11:02 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Thu, 5 Oct 2023 21:05:33 +0000 (17:05 -0400)
commitffe1f2f8f159749905e224dbaa06f79681063b08
treeec2a04c608dc0e533d3a229b59a4393bbc92d442
parent9015edc3f34bbaf1906b9e5c83be7c49ef7c42c8
cephadm: update test to avoid using exception handling as an assertion

The use of an exception as an assertion mostly works but has the side
effect of hiding other errors. Hiding these errors can make it hard to
debug problems in this code path, as it did for me recently. Update the
test to use a standard assertion as well as asserting that the assertion
must have been called.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/cephadm/tests/test_cephadm.py