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
12 changes: 10 additions & 2 deletions elementary/monitor/alerts/test_alert.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,16 @@ def summary(self) -> str:
)

if self.test_type == "schema_change":
return f"{self.test_sub_type_display_name} on {asset_name}"
return f'"{self.concise_name}" test failed on {asset_name}'
return (
f"{self.test_sub_type_display_name} on {asset_name}"
if asset_name
else self.test_sub_type_display_name
)
return (
f'"{self.concise_name}" test failed on {asset_name}'
if asset_name
else f'"{self.concise_name}" test failed'
)

def get_report_link(self) -> Optional[ReportLinkData]:
return get_test_runs_link(self.report_url, self.elementary_unique_id)
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"items": [
{
"type": "TextBlock",
"text": "\"test_short_name\" test failed on ",
"text": "\"test_short_name\" test failed",
"weight": "bolder",
"size": "large",
"wrap": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"items": [
{
"type": "TextBlock",
"text": "Error: \"test_short_name\" test failed on ",
"text": "Error: \"test_short_name\" test failed",
"weight": "bolder",
"size": "large",
"wrap": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"items": [
{
"type": "TextBlock",
"text": "Failure: \"test_short_name\" test failed on ",
"text": "Failure: \"test_short_name\" test failed",
"weight": "bolder",
"size": "large",
"wrap": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"items": [
{
"type": "TextBlock",
"text": "Generic on ",
"text": "Generic",
"weight": "bolder",
"size": "large",
"wrap": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"items": [
{
"type": "TextBlock",
"text": "\"test_short_name\" test failed on ",
"text": "\"test_short_name\" test failed",
"weight": "bolder",
"size": "large",
"wrap": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"items": [
{
"type": "TextBlock",
"text": "Error: \"test_short_name\" test failed on ",
"text": "Error: \"test_short_name\" test failed",
"weight": "bolder",
"size": "large",
"wrap": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"items": [
{
"type": "TextBlock",
"text": "Generic on ",
"text": "Generic",
"weight": "bolder",
"size": "large",
"wrap": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"items": [
{
"type": "TextBlock",
"text": "Warning: \"test_short_name\" test failed on ",
"text": "Warning: \"test_short_name\" test failed",
"weight": "bolder",
"size": "large",
"wrap": true
Expand Down
Loading