Skip to content

Commit

Permalink
Update sqs constructor to allow custom endpoint (#166)
Browse files Browse the repository at this point in the history
To allow for mocking of SQS queues a configurable endpoint is required.
For SNS this has already been done, this is just adding the same for
SQS.
  • Loading branch information
pp-davy authored and jprobinson committed Nov 19, 2018
1 parent fe286d8 commit 7084bb2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pubsub/aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ func NewSubscriber(cfg SQSConfig) (pubsub.Subscriber, error) {
s.sqs = sqs.New(sess, &aws.Config{
Credentials: creds,
Region: &cfg.Region,
Endpoint: cfg.EndpointURL,
})

if len(cfg.QueueURL) == 0 {
Expand Down

0 comments on commit 7084bb2

Please sign in to comment.