Skip to content

Commit

Permalink
[serverless] Share snapshots between integration tests (#11630)
Browse files Browse the repository at this point in the history
  • Loading branch information
nhinsch authored Apr 12, 2022
1 parent 3cb281b commit 5aab196
Show file tree
Hide file tree
Showing 85 changed files with 379 additions and 755 deletions.
5 changes: 4 additions & 1 deletion test/integration/serverless/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ for function_name in "${all_functions[@]}"; do
perl -p -e "s/dd_lambda_layer:datadog-go[0-9.]{1,}/dd_lambda_layer:datadog-gox.x.x/g" |
perl -p -e "s/(dd_lambda_layer:datadog-python)[0-9_]+\.[0-9]+\.[0-9]+/\1X\.X\.X/g" |
perl -p -e "s/(serverless.lambda-extension.integration-test.count)[0-9\.]+/\1/g" |
perl -p -e "s/(architecture:)(x86_64|arm64)/\1XXX/g" |
perl -p -e "s/$stage/XXXXXX/g" |
perl -p -e "s/[ ]$//g" |
sort
Expand All @@ -249,6 +250,7 @@ for function_name in "${all_functions[@]}"; do
perl -p -e "s/(,\"request_id\":\")[a-zA-Z0-9\-,]+\"//g" |
perl -p -e "s/$stage/STAGE/g" |
perl -p -e "s/(\"message\":\").*(XXX LOG)/\1\2\3/g" |
perl -p -e "s/(architecture:)(x86_64|arm64)/\1XXX/g" |
perl -p -e "s/[ ]$//g" |
# ignore a Lambda error that occurs sporadically for log-csharp
# see here for more info: https://repost.aws/questions/QUq2OfIFUNTCyCKsChfJLr5w/lambda-function-working-locally-but-crashing-on-aws
Expand All @@ -271,13 +273,14 @@ for function_name in "${all_functions[@]}"; do
perl -p -e "s/(,\"runtime-id\":\")[a-zA-Z0-9\-,]+\"/\1XXX\"/g" |
perl -p -e "s/(,\"system.pid\":\")[a-zA-Z0-9\-,]+\"/\1XXX\"/g" |
perl -p -e "s/(\"_dd.no_p_sr\":)[0-9\.]+/\1XXX/g" |
perl -p -e "s/(\"architecture\":)\"(x86_64|arm64)\"/\1\"XXX\"/g" |
perl -p -e "s/$stage/XXXXXX/g" |
perl -p -e "s/[ ]$//g" |
sort
)
fi

function_snapshot_path="./snapshots/${ARCHITECTURE}/${function_name}"
function_snapshot_path="./snapshots/${function_name}"

if [ ! -f "$function_snapshot_path" ]; then
printf "${MAGENTA} CREATE ${END_COLOR} $function_name\n"
Expand Down
17 changes: 0 additions & 17 deletions test/integration/serverless/snapshots/amd64/error-csharp

This file was deleted.

Loading

0 comments on commit 5aab196

Please sign in to comment.