From 1a09ff5d14a0a32e7833c7ac9e313c9d65fb2e35 Mon Sep 17 00:00:00 2001 From: xin liang Date: Thu, 2 Jan 2025 21:39:50 +0800 Subject: [PATCH] Dev: unittests: Adjust unit test for previous commit --- test/unittests/test_bootstrap.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/unittests/test_bootstrap.py b/test/unittests/test_bootstrap.py index c015669a4..7432bfef9 100644 --- a/test/unittests/test_bootstrap.py +++ b/test/unittests/test_bootstrap.py @@ -1305,7 +1305,11 @@ def test_sync_files_to_disk(self, mock_isfile, mock_cluster_cmd): mock_isfile.side_effect = [True, True] bootstrap.sync_files_to_disk() mock_isfile.assert_has_calls([mock.call("file1"), mock.call("file2")]) - mock_cluster_cmd.assert_called_once_with("sync file1 file2") + mock_cluster_cmd.assert_has_calls([ + mock.call("test -f file1"), + mock.call("test -f file2"), + mock.call("sync file1 file2") + ]) @mock.patch('logging.Logger.debug') @mock.patch('crmsh.sh.ClusterShell.get_stdout_or_raise_error')