Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for test result ingestion in the CLI #347

Merged
merged 16 commits into from
Jan 25, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
test: fix tests due to prep plugin and file finder changes
Signed-off-by: joseph-sentry <joseph.sawaya@sentry.io>
  • Loading branch information
joseph-sentry committed Jan 25, 2024
commit bc1865892fd298e38779b4f236713d0e57fbf144
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
Loading