Skip to content

Commit

Permalink
Check Error in unit test and clean up docs
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
  • Loading branch information
Tyler Reid committed Jul 6, 2021
1 parent 077b20d commit 7ecb6bc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1032,6 +1032,10 @@ func TestInvalidSNSConfig(t *testing.T) {
if err == nil {
t.Fatalf("expected error with missing fields on SNS config")
}
const expectedErr = `must provide either a Target ARN, Topic ARN, or Phone Number for SNS config`
if err.Error() != expectedErr {
t.Errorf("Expected: %s\nGot: %s", expectedErr, err.Error())
}
}

func TestUnmarshalHostPort(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ value: <tmpl_string>

# The SNS API URL i.e. https://sns.us-east-2.amazonaws.com.
# If not specified, the SNS API URL from the SNS SDK will be used.
[api_url: <tmpl_string>]
[ api_url: <tmpl_string> ]

# Configures AWS's Signature Verification 4 signing process to sign requests.
sigv4:
Expand All @@ -710,7 +710,7 @@ sigv4:
# If you don't specify this value, you must specify a value for the phone_number or target_arn.
# If you are using a FIFO SNS topic you should set a message group interval longer than 5 minutes
# to prevent messages with the same group key being deduplicated by the SNS default deduplication window
[ topic_arn: <tmpl_string>]
[ topic_arn: <tmpl_string> ]

# Subject line when the message is delivered to email endpoints.
[ subject: <tmpl_string> | default = '{{ template "sns.default.subject" .}}' ]
Expand All @@ -728,7 +728,7 @@ sigv4:

# SNS message attributes.
attributes:
[key : value]
[ <string>: <string> ... ]

# The HTTP client's configuration.
[ http_config: <http_config> | default = global.http_config ]
Expand Down

0 comments on commit 7ecb6bc

Please sign in to comment.