This repository has been archived by the owner on May 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix undefined field httpMethod. (#53)
* Fix undefined field httpMethod. Signed-off-by: David Calavera <david.calavera@gmail.com> (cherry picked from commit 9365ba49090ff0e8976415e93919cced6f3bd599) * Make alb tests run only when the feature is enabled. Signed-off-by: David Calavera <david.calavera@gmail.com>
- Loading branch information
Showing
7 changed files
with
156 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
aws_lambda_events/src/generated/fixtures/alb-lambda-target-request-headers-only.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"requestContext": { | ||
"elb": { | ||
"targetGroupArn": "arn:aws:elasticloadbalancing:us-east-1:123456789012:targetgroup/lambda-target/abcdefg" | ||
} | ||
}, | ||
"httpMethod": "GET", | ||
"path": "/", | ||
"queryStringParameters": { | ||
"key": "hello" | ||
}, | ||
"headers": { | ||
"accept": "*/*", | ||
"connection": "keep-alive", | ||
"host": "lambda-test-alb-1334523864.us-east-1.elb.amazonaws.com", | ||
"user-agent": "curl/7.54.0", | ||
"x-amzn-trace-id": "Root=1-5c34e93e-4dea0086f9763ac0667b115a", | ||
"x-forwarded-for": "25.12.198.67", | ||
"x-forwarded-port": "80", | ||
"x-forwarded-proto": "http", | ||
"x-imforwards": "20", | ||
"x-myheader": "123" | ||
}, | ||
"isBase64Encoded": false | ||
} | ||
|
49 changes: 49 additions & 0 deletions
49
aws_lambda_events/src/generated/fixtures/alb-lambda-target-request-multivalue-headers.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"requestContext": { | ||
"elb": { | ||
"targetGroupArn": "arn:aws:elasticloadbalancing:us-east-1:123456789012:targetgroup/lambda-target/abcdefgh" | ||
} | ||
}, | ||
"httpMethod": "GET", | ||
"path": "/", | ||
"multiValueQueryStringParameters": { | ||
"key": [ | ||
"hello" | ||
] | ||
}, | ||
"multiValueHeaders": { | ||
"accept": [ | ||
"*/*" | ||
], | ||
"connection": [ | ||
"keep-alive" | ||
], | ||
"host": [ | ||
"lambda-test-alb-1234567.us-east-1.elb.amazonaws.com" | ||
], | ||
"user-agent": [ | ||
"curl/7.54.0" | ||
], | ||
"x-amzn-trace-id": [ | ||
"Root=1-5c34e7d4-00ca239424b68028d4c56d68" | ||
], | ||
"x-forwarded-for": [ | ||
"72.21.198.67" | ||
], | ||
"x-forwarded-port": [ | ||
"80" | ||
], | ||
"x-forwarded-proto": [ | ||
"http" | ||
], | ||
"x-imforwards": [ | ||
"20" | ||
], | ||
"x-myheader": [ | ||
"123" | ||
] | ||
}, | ||
"body": "Some text", | ||
"isBase64Encoded": false | ||
} | ||
|
15 changes: 15 additions & 0 deletions
15
aws_lambda_events/src/generated/fixtures/alb-lambda-target-response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"isBase64Encoded": false, | ||
"statusCode": 200, | ||
"statusDescription": "200 OK", | ||
"headers": { | ||
"Set-cookie": "cookies", | ||
"Content-Type": "application/json" | ||
}, | ||
"multiValueHeaders": { | ||
"Set-cookie": ["cookie-name=cookie-value;Domain=myweb.com;Secure;HttpOnly","cookie-name=cookie-value;Expires=May 8, 2019"], | ||
"Content-Type": ["application/json"] | ||
}, | ||
"body": "Hello from Lambda" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters