Skip to content

Commit 10a887f

Browse files
Fix unit test
1 parent 6d13113 commit 10a887f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/test_cli.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,9 +344,11 @@ def test_bulk_update_embeddings_exit_bulk_operation_error(
344344
@patch("tim.opensearch.create_index")
345345
@patch("tim.opensearch.promote_index")
346346
@patch("tim.opensearch.get_index_aliases")
347+
@patch("tim.opensearch.bulk_update")
347348
@patch("tim.opensearch.bulk_index")
348349
def test_reindex_source_success(
349350
mock_bulk_index,
351+
mock_bulk_update,
350352
mock_get_index_aliases,
351353
mock_promote_index,
352354
mock_create_index,
@@ -362,6 +364,11 @@ def test_reindex_source_success(
362364
"errors": 0,
363365
"total": 1000,
364366
}
367+
mock_bulk_update.return_value = {
368+
"updated": 10,
369+
"errors": 0,
370+
"total": 10,
371+
}
365372

366373
result = runner.invoke(
367374
main,

0 commit comments

Comments
 (0)