Mock out calls to shutil.rmtree in test_deploy_and_rm_iscsi. The test
never asserts that things in the file system are removed, so making the
call a no-op is safe. Calling shutil.rmtree with the fake file system
enabled recently became a problem. In python 3.12 (or 3.11?) changes to
the shutil module function shutil.rmtree are incompatible with the fake
file system that cephadm tests rely upon heavily.
Part of an effort to get ceph tox environments passing on Python 3.12.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
def test_deploy_and_rm_iscsi(cephadm_fs, funkypatch):
# Test that the deploy and remove paths for iscsi (which has sidecar container)
# create and remove the correct unit files.
+ funkypatch.patch('shutil.rmtree') # fakefs + shutil.rmtree breaks on py3.12
mocks = _common_patches(funkypatch)
_firewalld = mocks['Firewalld']
fsid = 'b01dbeef-701d-9abe-0000-e1e5a47004a7'