Skip to content

Commit

Permalink
test: add testcase for sqs delete_batch operation (#1283)
Browse files Browse the repository at this point in the history
Assert 'span.name' and 'span.action' are following the
spec for delete_batch operations.

The actions were not described in the original spec but
the output seems to be correct so we just add a test to
avoid regressions and verification.
  • Loading branch information
kruskall committed Aug 8, 2022
1 parent 4364db8 commit 0f2b9ce
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions module/apmawssdkgo/sqs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,24 @@ func TestSQS(t *testing.T) {
})
},
},
{
name: "SQS DELETE_BATCH from OtherQueue",
action: "delete_batch",
resource: "sqs/OtherQueue",
queueName: "OtherQueue",
queueURL: "https://sqs.testing.invalid/123456789012/OtherQueue",
fn: func(ctx context.Context, svc *sqs.SQS, queueURL string) {
svc.DeleteMessageBatchWithContext(ctx, &sqs.DeleteMessageBatchInput{
QueueUrl: &queueURL,
Entries: []*sqs.DeleteMessageBatchRequestEntry{
{
Id: aws.String("1"),
ReceiptHandle: aws.String("receiptHandle"),
},
},
})
},
},
{
ignored: true,
fn: func(ctx context.Context, svc *sqs.SQS, _ string) {
Expand Down

0 comments on commit 0f2b9ce

Please sign in to comment.