Skip to content

Commit a21a400

Browse files
committed
Test logic for multiple query params
1 parent 7b0d0f4 commit a21a400

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

plugins/node/opentelemetry-instrumentation-aws-lambda/test/integrations/lambda-handler.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -781,14 +781,15 @@ describe('lambda handler', () => {
781781
},
782782
queryStringParameters: {
783783
key: 'value',
784+
key2: 'value2'
784785
},
785786
};
786787

787788
await lambdaRequire('lambda-test/sync').handler(event, ctx, () => {});
788789
const [span] = memoryExporter.getFinishedSpans();
789-
assert.strictEqual(
790-
span.attributes[ATTR_URL_FULL],
791-
'http://www.example.com/lambda/test/path?key=value'
790+
assert.ok(
791+
(span.attributes[ATTR_URL_FULL] === 'http://www.example.com/lambda/test/path?key=value&key2=value2') ||
792+
(span.attributes[ATTR_URL_FULL] === 'http://www.example.com/lambda/test/path?key2=value2&key=value')
792793
);
793794
});
794795
it('pulls url from api gateway http events', async () => {

0 commit comments

Comments
 (0)