Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ekneg54 committed Sep 11, 2024
1 parent 451e1b9 commit 9784f8f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
4 changes: 4 additions & 0 deletions tests/unit/connector/test_http_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,7 @@ def test_store_counts_processed_events(self):
self.object.metrics.number_of_processed_events = 0
self.object.store({"message": "my event message"})
assert self.object.metrics.number_of_processed_events == 1

@pytest.mark.skip(reason="not implemented")
def test_setup_calls_wait_for_health(self):
pass
4 changes: 4 additions & 0 deletions tests/unit/connector/test_json_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,7 @@ def test_repeat_documents_repeats_documents(self, mock_parse):
for order in range(0, 9):
event, _ = object.get_next(self.timeout)
assert event.get("order") == order % 3

@pytest.mark.skip(reason="not implemented")
def test_setup_calls_wait_for_health(self):
pass
4 changes: 4 additions & 0 deletions tests/unit/connector/test_jsonl_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,7 @@ def test_repeat_documents_repeats_documents(self, mock_parse):
for order in range(0, 9):
event, _ = object.get_next(self.timeout)
assert event.get("order") == order % 3

@pytest.mark.skip(reason="not implemented")
def test_setup_calls_wait_for_health(self):
pass
6 changes: 0 additions & 6 deletions tests/unit/connector/test_opensearch_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,12 +362,6 @@ def test_handle_serialization_error_raises_fatal_output_error(self):
with pytest.raises(FatalOutputError):
self.object._handle_serialization_error(mock.MagicMock())

def test_setup_raises_fatal_output_error_if_opensearch_error_is_raised(self):
self.object._search_context.info = mock.MagicMock()
self.object._search_context.info.side_effect = SearchException
with pytest.raises(FatalOutputError):
self.object.setup()

def test_setup_registers_flush_timout_tasks(self):
job_count = len(Component._scheduler.jobs)
with mock.patch.object(self.object, "_search_context", new=mock.MagicMock()):
Expand Down

0 comments on commit 9784f8f

Please sign in to comment.