-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implement tgtm suggestions to apigw custom domain sample (#246)
* implement tgtm suggestions to apigw custom domain sample * upgrade serverless localstack plugin version * implement suggestions * make suggested changes * skip auth token check * make all changes
- Loading branch information
1 parent
d308c5f
commit a20710d
Showing
7 changed files
with
148 additions
and
109 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
invoke_endpoints() { | ||
echo "Invoking endpoint 1: http://test.example.com:4566/hello" | ||
response1=$(curl -H 'Host: test.example.com' http://localhost:4566/hello) | ||
if [ "$response1" != "hello world" ]; then | ||
echo "Error: Response from endpoint 1 does not match expected output." | ||
exit 1 | ||
fi | ||
|
||
echo "Invoking endpoint 2: http://test.example.com:4566/goodbye" | ||
response2=$(curl -H 'Host: test.example.com' http://localhost:4566/goodbye) | ||
if [ "$response2" != "goodbye" ]; then | ||
echo "Error: Response from endpoint 2 does not match expected output." | ||
exit 1 | ||
fi | ||
} | ||
|
||
target="${target:-default}" | ||
|
||
if [[ "$target" == "ci" ]]; then | ||
invoke_endpoints | ||
else | ||
echo "Now trying to invoke the API Gateway endpoints with custom domains." | ||
echo "Sample command to invoke endpoint 1:" | ||
echo "curl -H 'Host: test.example.com' http://localhost:4566/hello" | ||
echo "Sample command to invoke endpoint 2:" | ||
echo "curl -H 'Host: test.example.com' http://localhost:4566/goodbye" | ||
fi |
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
5 changes: 0 additions & 5 deletions
5
...hot-reloading/javascript-terraform-layers/layer_src/nodejs/node_modules/test-dep/index.js
This file was deleted.
Oops, something went wrong.