Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Address pr comments
Browse files Browse the repository at this point in the history
adrain-cb committed Feb 9, 2024

Unverified

This user has not yet uploaded their public signing key.
1 parent e17ab0e commit bc97527
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions e2e/alerting_test.go
Original file line number Diff line number Diff line change
@@ -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()
1 change: 1 addition & 0 deletions internal/client/sns.go
Original file line number Diff line number Diff line change
@@ -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),
})

0 comments on commit bc97527

Please sign in to comment.