Skip to content

Commit

Permalink
Dev: unittests: Adjust unit test for previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
liangxin1300 committed Jan 2, 2025
1 parent 2a87a30 commit 1a09ff5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/unittests/test_bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 1a09ff5

Please sign in to comment.