Skip to content

Commit

Permalink
update fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
jsumners-nr committed Aug 20, 2024
1 parent 5a0ad9e commit e51a647
Showing 1 changed file with 29 additions and 18 deletions.
47 changes: 29 additions & 18 deletions test/unit/serverless/lambda-sample-events.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,10 @@ const cloudFormationCreateRequestEvent = {
}

const apiGatewayProxyEvent = {
version: '1.0',
resource: '/{proxy+}',
path: '/test/hello',
httpMethod: 'GET',
headers: {
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
'Accept-Encoding': 'gzip, deflate, lzma, sdch, br',
Expand All @@ -280,9 +283,12 @@ const apiGatewayProxyEvent = {
'X-Forwarded-Port': '443',
'X-Forwarded-Proto': 'https'
},
pathParameters: {
proxy: 'hello'
multiValueHeaders: null,
queryStringParameters: {
name: 'me',
team: 'node agent'
},
multiValueQueryStringParameters: null,
requestContext: {
accountId: '123456789012',
resourceId: 'us4z18',
Expand All @@ -305,15 +311,14 @@ const apiGatewayProxyEvent = {
httpMethod: 'GET',
apiId: 'wt6mne2s9k'
},
resource: '/{proxy+}',
httpMethod: 'GET',
queryStringParameters: {
name: 'me',
team: 'node agent'
pathParameters: {
proxy: 'hello'
},
stageVariables: {
stageVarName: 'stageVarValue'
}
},
body: null,
isBase64Encoded: false
}

const cloudWatchLogsEvent = {
Expand Down Expand Up @@ -490,17 +495,11 @@ const sesEvent = {
}

const albEventWithMultiValueParameters = {
requestContext: {
elb: {
targetGroupArn:
'arn:aws:elasticloadbalancing:us-east-2:123456789012:targetgroup/lambda-279XGJDqGZ5rsrHC2Fjr/49e9d65c45c6791a'
}
},
httpMethod: 'GET',
version: '1.0',
resource: '/lambda',
path: '/lambda',
multiValueQueryStringParameters: {
query: ['1234ABCD', 'other']
},
httpMethod: 'GET',
headers: null,
multiValueHeaders: {
'accept': [
'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8'
Expand All @@ -523,6 +522,18 @@ const albEventWithMultiValueParameters = {
'cookie-name=cookie-other-value'
]
},
queryStringParameters: null,
multiValueQueryStringParameters: {
query: ['1234ABCD', 'other']
},
requestContext: {
elb: {
targetGroupArn:
'arn:aws:elasticloadbalancing:us-east-2:123456789012:targetgroup/lambda-279XGJDqGZ5rsrHC2Fjr/49e9d65c45c6791a'
}
},
pathParameters: null,
stageVariables: null,
body: '',
isBase64Encoded: false
}
Expand Down

0 comments on commit e51a647

Please sign in to comment.