Skip to content

Commit 5b23c66

Browse files
committed
Test for case variations on headers
1 parent c63450c commit 5b23c66

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -776,8 +776,9 @@ describe('lambda handler', () => {
776776
const event = {
777777
path: '/lambda/test/path',
778778
headers: {
779-
host: 'www.example.com',
780-
'x-forwarded-proto': 'http',
779+
Host: 'www.example.com',
780+
'X-Forwarded-Proto': 'http',
781+
'X-Forwarded-Port': 1234,
781782
},
782783
queryStringParameters: {
783784
key: 'value',
@@ -789,9 +790,9 @@ describe('lambda handler', () => {
789790
const [span] = memoryExporter.getFinishedSpans();
790791
assert.ok(
791792
span.attributes[ATTR_URL_FULL] ===
792-
'http://www.example.com/lambda/test/path?key=value&key2=value2' ||
793+
'http://www.example.com:1234/lambda/test/path?key=value&key2=value2' ||
793794
span.attributes[ATTR_URL_FULL] ===
794-
'http://www.example.com/lambda/test/path?key2=value2&key=value'
795+
'http://www.example.com:1234/lambda/test/path?key2=value2&key=value'
795796
);
796797
});
797798
it('pulls url from api gateway http events', async () => {

0 commit comments

Comments
 (0)