Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions src/sentry/tempest/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ def fetch_latest_item_id(credentials_id: int, **kwargs) -> None:
if result["latest_id"] is None:
# If there are no crashes in the CRS we want to communicate that back to the
# customer so that they are not surprised about no crashes arriving.
credentials.message = "No crashes found"
credentials.message_type = MessageType.ERROR
credentials.message = "Connection successful. No crashes found in the crash report system yet. New crashes will appear here automatically when they occur."
credentials.message_type = MessageType.WARNING
credentials.save(update_fields=["message", "message_type"])
return
else:
Expand Down
7 changes: 5 additions & 2 deletions tests/sentry/tempest/test_tempest.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,11 @@ def test_fetch_latest_item_id_task_no_id(self, mock_fetch: MagicMock) -> None:
fetch_latest_item_id(self.credentials.id)

self.credentials.refresh_from_db()
assert self.credentials.message == "No crashes found"
assert self.credentials.message_type == MessageType.ERROR
assert (
self.credentials.message
== "Connection successful. No crashes found in the crash report system yet. New crashes will appear here automatically when they occur."
)
assert self.credentials.message_type == MessageType.WARNING
assert self.credentials.latest_fetched_item_id is None

@patch("sentry.tempest.tasks.fetch_latest_id_from_tempest")
Expand Down
Loading