summaryrefslogtreecommitdiff
path: root/plugins/jobs/broker/sqs/job_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jobs/broker/sqs/job_test.go')
-rw-r--r--plugins/jobs/broker/sqs/job_test.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/plugins/jobs/broker/sqs/job_test.go b/plugins/jobs/broker/sqs/job_test.go
new file mode 100644
index 00000000..a120af53
--- /dev/null
+++ b/plugins/jobs/broker/sqs/job_test.go
@@ -0,0 +1,19 @@
+package sqs
+
+import (
+ "github.com/aws/aws-sdk-go/aws"
+ "github.com/aws/aws-sdk-go/service/sqs"
+ "github.com/stretchr/testify/assert"
+ "testing"
+)
+
+func Test_Unpack(t *testing.T) {
+ msg := &sqs.Message{
+ Body: aws.String("body"),
+ Attributes: map[string]*string{},
+ MessageAttributes: map[string]*sqs.MessageAttributeValue{},
+ }
+
+ _, _, _, err := unpack(msg)
+ assert.Error(t, err)
+}