@@ -561,7 +561,7 @@ def test_setup_passwordless_with_other_nodes_failed_fetch_nodelist(self, mock_ru
561561 with self .assertRaises (SystemExit ):
562562 bootstrap .setup_passwordless_with_other_nodes ("node1" )
563563
564- mock_run .assert_called_once_with ('carol' , 'ssh {} alice@node1 PATH= \\ " \\ $PATH \\ ":/usr/sbin:/sbin crm_node -l' .format (constants .SSH_OPTION ))
564+ mock_run .assert_called_once_with ('carol' , 'ssh {} alice@node1 sudo crm_node -l' .format (constants .SSH_OPTION ))
565565 mock_error .assert_called_once_with ("Can't fetch cluster nodes list from node1: None" )
566566
567567 @mock .patch ('crmsh.utils.fatal' )
@@ -589,7 +589,7 @@ def test_setup_passwordless_with_other_nodes_failed_fetch_hostname(
589589 bootstrap .setup_passwordless_with_other_nodes ("node1" )
590590
591591 mock_run .assert_has_calls ([
592- mock .call ('carol' , 'ssh {} alice@node1 PATH= \\ " \\ $PATH \\ ":/usr/sbin:/sbin crm_node -l' .format (constants .SSH_OPTION )),
592+ mock .call ('carol' , 'ssh {} alice@node1 sudo crm_node -l' .format (constants .SSH_OPTION )),
593593 mock .call ('carol' , 'ssh {} alice@node1 hostname' .format (constants .SSH_OPTION ))
594594 ])
595595 mock_error .assert_called_once_with ("Can't fetch hostname of node1: None" )
@@ -623,7 +623,7 @@ def test_setup_passwordless_with_other_nodes(
623623 bootstrap .setup_passwordless_with_other_nodes ("node1" )
624624
625625 mock_run .assert_has_calls ([
626- mock .call ('carol' , 'ssh {} alice@node1 PATH= \\ " \\ $PATH \\ ":/usr/sbin:/sbin crm_node -l' .format (constants .SSH_OPTION )),
626+ mock .call ('carol' , 'ssh {} alice@node1 sudo crm_node -l' .format (constants .SSH_OPTION )),
627627 mock .call ('carol' , 'ssh {} alice@node1 hostname' .format (constants .SSH_OPTION ))
628628 ])
629629 mock_userof .assert_called_once_with ("node2" )
0 commit comments