diff --git a/e2e/alerting_test.go b/e2e/alerting_test.go index 18de005c..e703ae47 100644 --- a/e2e/alerting_test.go +++ b/e2e/alerting_test.go @@ -80,11 +80,11 @@ func TestMultiDirectiveRouting(t *testing.T) { return height != nil && height.Uint64() > receipt.BlockNumber.Uint64(), nil })) - sqsMessages, err := e2e.GetSNSMessages(ts.AppCfg.AlertConfig.SNSConfig.Endpoint, "multi-directive-test-queue") + snsMessages, err := e2e.GetSNSMessages(ts.AppCfg.AlertConfig.SNSConfig.Endpoint, "multi-directive-test-queue") require.NoError(t, err) - assert.Len(t, sqsMessages.Messages, 1, "Incorrect number of SNS messages sent") - assert.Contains(t, *sqsMessages.Messages[0].Body, "contract_event", "System contract event alert was not sent") + assert.Len(t, snsMessages.Messages, 1, "Incorrect number of SNS messages sent") + assert.Contains(t, *snsMessages.Messages[0].Body, "contract_event", "System contract event alert was not sent") slackPosts := ts.TestSlackSvr.SlackAlerts() pdPosts := ts.TestPagerDutyServer.PagerDutyAlerts() diff --git a/internal/client/sns.go b/internal/client/sns.go index 4423869b..0dc87ff3 100644 --- a/internal/client/sns.go +++ b/internal/client/sns.go @@ -58,6 +58,7 @@ func NewSNSClient(cfg *SNSConfig, name string) SNSClient { // Initialize a session that the SDK will use to load configuration, // credentials, and region. AWS_REGION, AWS_SECRET_ACCESS_KEY, and AWS_ACCESS_KEY_ID should be set in the // environment's runtime + // Note: If session is to arbitrarily crash, there is a possibility that message publishing will fail sess, err := session.NewSession(&aws.Config{ Endpoint: aws.String(cfg.Endpoint), })