From a661a4c88b0122986ae04b1ff63f65156eecf6bd Mon Sep 17 00:00:00 2001 From: Trial97 Date: Thu, 28 Feb 2019 15:29:41 +0200 Subject: [PATCH] Updated SQSPoster to accept token as optional parameter --- data/conf/samples/cdrsonexpmaster/cdrsreplicationmaster.json | 2 +- engine/poster.go | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/data/conf/samples/cdrsonexpmaster/cdrsreplicationmaster.json b/data/conf/samples/cdrsonexpmaster/cdrsreplicationmaster.json index 9aa41f503..b50b0e6a3 100644 --- a/data/conf/samples/cdrsonexpmaster/cdrsreplicationmaster.json +++ b/data/conf/samples/cdrsonexpmaster/cdrsreplicationmaster.json @@ -92,7 +92,7 @@ }, "sqs_test_file": { "export_format": "*sqs_json_map", - "export_path": "http://localhost:4576/?aws_region=eu-west-1&aws_key=key1&aws_secret=secret&aws_token=token", + "export_path": "http://sqs.eu-west-2.amazonaws.com/?aws_region=eu-west-2&aws_key=testkey&aws_secret=testsecret", "content_fields": [ {"tag": "CGRID", "type": "*composed", "value": "~CGRID", "field_id": "CGRID"}, ], diff --git a/engine/poster.go b/engine/poster.go index 017f45605..ad35868a1 100644 --- a/engine/poster.go +++ b/engine/poster.go @@ -663,8 +663,7 @@ func (pstr *SQSPoster) newPosterSession() (s *sqs.SQS, err error) { cfg.Region = aws.String(pstr.awsRegion) } if len(pstr.awsID) != 0 && - len(pstr.awsKey) != 0 && - len(pstr.awsToken) != 0 { + len(pstr.awsKey) != 0 { cfg.Credentials = credentials.NewStaticCredentials(pstr.awsID, pstr.awsKey, pstr.awsToken) } ses, err = session.NewSessionWithOptions(