Skip to content

Commit dd2a150

Browse files
committed
ceph-volume: address test_activate_dmcrypt_tpm
This mocks the call to `luks_close()`, otherwise this test fails when run on a system where `cryptsetup` isn't available. Signed-off-by: Guillaume Abrioux <[email protected]>
1 parent 68e73b3 commit dd2a150

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/ceph-volume/ceph_volume/tests/objectstore/test_rawbluestore.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ def test_activate_osd_id_and_fsid(self,
159159

160160
@patch('ceph_volume.objectstore.rawbluestore.encryption_utils.rename_mapper', Mock(return_value=MagicMock()))
161161
@patch('ceph_volume.util.disk.get_bluestore_header')
162+
@patch('ceph_volume.objectstore.rawbluestore.encryption_utils.luks_close', Mock(return_value=MagicMock()))
162163
@patch('ceph_volume.objectstore.rawbluestore.encryption_utils.luks_open', Mock(return_value=MagicMock()))
163164
def test_activate_dmcrypt_tpm(self, m_bs_header, rawbluestore, fake_lsblk_all, mock_raw_direct_report, is_root) -> None:
164165
m_bs_header.return_value = {

0 commit comments

Comments
 (0)