• Bug#1109786: unblock: crmsh/5.0.0~rc2-1 (4/4)

    From Valentin Vidic@21:1/5 to All on Wed Jul 23 22:00:01 2025
    [continued from previous message]

    bootstrap._context = mock.Mock(cluster_node="node1", rm_list=["file1", "file2"])
    bootstrap.remove_node_from_cluster('node1')
    @@ -2021,9 +2046,7 @@
    ])
    mock_stop.assert_called_once_with(bootstrap.SERVICES_STOP_LIST, remote_addr="node1")
    mock_cal_delnode.assert_called_once_with("node1")
    - mock_invoke.assert_has_calls([
    - mock.call("corosync-cfgtool -R")
    - ])
    + mock_cluster_shell_inst.get_stdout_or_raise_error.assert_called_once_with("corosync-cfgtool -R")
    mock_invokerc.assert_called_once_with("sed -i /node1/d {}".format(bootstrap.CSYNC2_CFG))
    mock_error.assert_not_called()
    mock_get_values.assert_called_once_with("nodelist.node.ring0_addr") diff -Nru crmsh-5.0.0~rc1/test/unittests/test_corosync.py crmsh-5.0.0~rc2/test/unittests/test_corosync.py
    --- crmsh-5.0.0~rc1/test/unittests/test_corosync.py 2025-05-22 11:11:04.000000000 +0200
    +++ crmsh-5.0.0~rc2/test/unittests/test_corosync.py 2025-07-15 07:03:56.000000000 +0200
    @@ -214,7 +214,7 @@
    mock_run.side_effect = ValueError
    mock_get_value.return_value = None
    assert corosync.get_corosync_value("xxx") is None
    - mock_run.assert_called_once_with("corosync-cmapctl xxx")
    + mock_run.assert_called_once_with("corosync-cmapctl runtime.config.xxx")
    mock_get_value.assert_called_once_with("xxx")


    @@ -222,7 +222,7 @@
    def test_get_corosync_value(mock_run):
    mock_run.return_value = "totem.token = 10000"
    assert corosync.get_corosync_value("totem.token") == "10000"
    - mock_run.assert_called_once_with("corosync-cmapctl totem.token")
    + mock_run.assert_called_once_with("corosync-cmapctl runtime.config.totem.token")


    class TestConfigParserSet(unittest.TestCase):
    diff -Nru crmsh-5.0.0~rc1/test/unittests/test_crashtest_task.py crmsh-5.0.0~rc2/test/unittests/test_c