Skip to content

Commit

Permalink
test: fix tests due to prep plugin and file finder changes
Browse files Browse the repository at this point in the history
Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>
  • Loading branch information
joseph-sentry committed Jan 25, 2024
1 parent 4a6d685 commit fc032ff
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions tests/services/upload/test_upload_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def test_do_upload_logic_happy_path_legacy_uploader(mocker):
mock_select_preparation_plugins.assert_called_with(
cli_config, ["first_plugin", "another", "forth"]
)
mock_select_file_finder.assert_called_with(None, None, None, False)
mock_select_file_finder.assert_called_with(None, None, None, False, "coverage")
mock_select_network_finder.assert_called_with(versioning_system)
mock_generate_upload_data.assert_called_with("coverage")
mock_send_upload_data.assert_called_with(
Expand Down Expand Up @@ -167,7 +167,7 @@ def test_do_upload_logic_happy_path(mocker):
mock_select_preparation_plugins.assert_called_with(
cli_config, ["first_plugin", "another", "forth"]
)
mock_select_file_finder.assert_called_with(None, None, None, False)
mock_select_file_finder.assert_called_with(None, None, None, False, "coverage")
mock_select_network_finder.assert_called_with(versioning_system)
mock_generate_upload_data.assert_called_with("coverage")
mock_send_upload_data.assert_called_with(
Expand Down Expand Up @@ -241,7 +241,7 @@ def test_do_upload_logic_dry_run(mocker):
enterprise_url=None,
)
out_bytes = parse_outstreams_into_log_lines(outstreams[0].getvalue())
mock_select_file_finder.assert_called_with(None, None, None, False)
mock_select_file_finder.assert_called_with(None, None, None, False, "coverage")
mock_select_network_finder.assert_called_with(versioning_system)
assert mock_generate_upload_data.call_count == 1
assert mock_send_upload_data.call_count == 0
Expand Down Expand Up @@ -392,7 +392,7 @@ def side_effect(*args, **kwargs):
mock_select_preparation_plugins.assert_called_with(
cli_config, ["first_plugin", "another", "forth"]
)
mock_select_file_finder.assert_called_with(None, None, None, False)
mock_select_file_finder.assert_called_with(None, None, None, False, "coverage")
mock_select_network_finder.assert_called_with(versioning_system)
mock_generate_upload_data.assert_called_with("coverage")
mock_upload_completion_call.assert_called_with(
Expand Down Expand Up @@ -464,7 +464,7 @@ def side_effect(*args, **kwargs):
mock_select_preparation_plugins.assert_called_with(
cli_config, ["first_plugin", "another", "forth"]
)
mock_select_file_finder.assert_called_with(None, None, None, False)
mock_select_file_finder.assert_called_with(None, None, None, False, "coverage")
mock_select_network_finder.assert_called_with(versioning_system)
mock_generate_upload_data.assert_called_with("coverage")

Expand Down Expand Up @@ -529,10 +529,8 @@ def test_do_upload_logic_happy_path_test_results(mocker):
]

assert res == UploadSender.send_upload_data.return_value
mock_select_preparation_plugins.assert_called_with(
cli_config, ["first_plugin", "another", "forth"]
)
mock_select_file_finder.assert_called_with(None, None, None, False)
mock_select_preparation_plugins.assert_not_called
mock_select_file_finder.assert_called_with(None, None, None, False, "test_results")
mock_select_network_finder.assert_called_with(versioning_system)
mock_generate_upload_data.assert_called_with("test_results")
mock_send_upload_data.assert_called_with(
Expand Down

0 comments on commit fc032ff

Please sign in to comment.