Skip to content

Commit 3c02439

Browse files
committed
Dev: unittests: Adjust unit test for previous commit
1 parent 359cbc7 commit 3c02439

File tree

3 files changed

+298
-120
lines changed

3 files changed

+298
-120
lines changed

test/unittests/test_bootstrap.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1539,12 +1539,15 @@ def test_adjust_pcmk_delay(self, mock_cib_inst, mock_run, mock_debug):
15391539
bootstrap.adjust_pcmk_delay_max(False)
15401540
mock_run.assert_called_once_with("crm resource param res_1 delete pcmk_delay_max")
15411541

1542-
@mock.patch('crmsh.sbd.SBDTimeout.adjust_sbd_timeout_related_cluster_configuration')
1542+
@mock.patch('crmsh.sbd.SBDTimeoutChecker')
15431543
@mock.patch('crmsh.service_manager.ServiceManager.service_is_active')
1544-
def test_adjust_stonith_timeout_sbd(self, mock_is_active, mock_sbd_adjust_timeout):
1544+
def test_adjust_stonith_timeout_sbd(self, mock_is_active, mock_sbd_checker):
1545+
mock_sbd_checker_inst = mock.Mock()
1546+
mock_sbd_checker.return_value = mock_sbd_checker_inst
1547+
mock_sbd_checker_inst.check_and_fix = mock.Mock()
15451548
mock_is_active.return_value = True
15461549
bootstrap.adjust_stonith_timeout()
1547-
mock_sbd_adjust_timeout.assert_called_once_with()
1550+
mock_sbd_checker.assert_called_once_with(fix=True, warn=False, from_bootstrap=True)
15481551

15491552
@mock.patch('crmsh.utils.set_property')
15501553
@mock.patch('crmsh.bootstrap.get_stonith_timeout_generally_expected')

0 commit comments

Comments
 (0)