Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test for case variations on headers
Browse files Browse the repository at this point in the history
johnbley committed Nov 15, 2024
1 parent c63450c commit 5b23c66
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -776,8 +776,9 @@ describe('lambda handler', () => {
const event = {
path: '/lambda/test/path',
headers: {
host: 'www.example.com',
'x-forwarded-proto': 'http',
Host: 'www.example.com',
'X-Forwarded-Proto': 'http',
'X-Forwarded-Port': 1234,
},
queryStringParameters: {
key: 'value',
@@ -789,9 +790,9 @@ describe('lambda handler', () => {
const [span] = memoryExporter.getFinishedSpans();
assert.ok(
span.attributes[ATTR_URL_FULL] ===
'http://www.example.com/lambda/test/path?key=value&key2=value2' ||
'http://www.example.com:1234/lambda/test/path?key=value&key2=value2' ||
span.attributes[ATTR_URL_FULL] ===
'http://www.example.com/lambda/test/path?key2=value2&key=value'
'http://www.example.com:1234/lambda/test/path?key2=value2&key=value'
);
});
it('pulls url from api gateway http events', async () => {

0 comments on commit 5b23c66

Please sign in to comment.