Better english (#1959)

Not sure if this breaks anything. it probably breaks backwards compat.

Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
This commit is contained in:
Dieter Plaetinck 2023-06-01 15:37:37 +03:00 committed by GitHub
parent eee5065e74
commit 44b105343a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 11 additions and 11 deletions

View file

@ -527,9 +527,9 @@ def test_channel_filter_convert_from_regex_to_jinja2(
make_channel_filter(alert_receive_channel, is_default=True)
# r"..." used to keep this string as raw string
regex_filtering_term = r"\".*\": \"This alert was sent by user for the demonstration purposes\""
final_filtering_term = r'{{ payload | json_dumps | regex_search("\".*\": \"This alert was sent by user for the demonstration purposes\"") }}'
payload = {"description": "This alert was sent by user for the demonstration purposes"}
regex_filtering_term = r"\".*\": \"This alert was sent by user for demonstration purposes\""
final_filtering_term = r'{{ payload | json_dumps | regex_search("\".*\": \"This alert was sent by user for demonstration purposes\"") }}'
payload = {"description": "This alert was sent by user for demonstration purposes"}
regex_channel_filter = make_channel_filter(
alert_receive_channel,

View file

@ -276,7 +276,7 @@ example_payload = {
"labels": {"alertname": "TestAlert", "region": "eu-1", "severity": "critical"},
"annotations": {
"message": "This is test alert",
"description": "This alert was sent by user for the demonstration purposes",
"description": "This alert was sent by user for demonstration purposes",
"runbook_url": "https://grafana.com/",
},
"startsAt": "2018-12-25T15:47:47.377363608Z",

View file

@ -57,4 +57,4 @@ resolve_condition = """\
acknowledge_condition = None
example_payload = {"message": "This alert was sent by user for the demonstration purposes"}
example_payload = {"message": "This alert was sent by user for demonstration purposes"}

View file

@ -52,5 +52,5 @@ example_payload = {
"image_url": "https://upload.wikimedia.org/wikipedia/commons/e/ee/Grumpy_Cat_by_Gage_Skidmore.jpg",
"state": "alerting",
"link_to_upstream_details": "https://en.wikipedia.org/wiki/Downtime",
"message": "This alert was sent by user for the demonstration purposes\nSmth happened. Oh no!",
"message": "This alert was sent by user for demonstration purposes\nSmth happened. Oh no!",
}

View file

@ -224,7 +224,7 @@ example_payload = {
"alertname": "TestAlert",
"region": "eu-1",
},
"annotations": {"description": "This alert was sent by user for the demonstration purposes"},
"annotations": {"description": "This alert was sent by user for demonstration purposes"},
"startsAt": "2018-12-25T15:47:47.377363608Z",
"endsAt": "0001-01-01T00:00:00Z",
"generatorURL": "",

View file

@ -115,7 +115,7 @@ example_payload = {
"alertname": "TestAlert",
"region": "eu-1",
},
"annotations": {"description": "This alert was sent by user for the demonstration purposes"},
"annotations": {"description": "This alert was sent by user for demonstration purposes"},
"startsAt": "2018-12-25T15:47:47.377363608Z",
"endsAt": "0001-01-01T00:00:00Z",
"generatorURL": "",

View file

@ -54,6 +54,6 @@ acknowledge_condition = None
example_payload = {
"id": "TestAlert",
"message": "This alert was sent by user for the demonstration purposes",
"message": "This alert was sent by user for demonstration purposes",
"data": "{foo: bar}",
}

View file

@ -57,4 +57,4 @@ resolve_condition = """\
{%- endif %}"""
acknowledge_condition = None
example_payload = {"message": "This alert was sent by user for the demonstration purposes"}
example_payload = {"message": "This alert was sent by user for demonstration purposes"}

View file

@ -54,5 +54,5 @@ example_payload = {
"image_url": "https://upload.wikimedia.org/wikipedia/commons/e/ee/Grumpy_Cat_by_Gage_Skidmore.jpg",
"state": "alerting",
"link_to_upstream_details": "https://en.wikipedia.org/wiki/Downtime",
"message": "This alert was sent by user for the demonstration purposes\nSmth happened. Oh no!",
"message": "This alert was sent by user for demonstration purposes\nSmth happened. Oh no!",
}