File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
integration-tests/serverless Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -11,30 +11,33 @@ ls "${SERVERLESS_INTEGRATION_DIR_PATH}/test-project/"
1111STAGE=$( xxd -l 4 -c 4 -p < /dev/random)
1212
1313function cleanup {
14- gcloud functions delete dd-trace-js-sls-mini-agent-integration-test-${STAGE} --region us-east1 --gen2 --quiet
14+ gcloud functions delete dd-trace-js-sls-mini-agent-integration-test-${STAGE} --region us-east1 --gen2 --quiet --project datadog-sandbox
1515}
1616trap cleanup EXIT
1717
1818echo " Deploying integration test cloud function"
1919
20- gcloud functions deploy dd-trace-js-sls-mini-agent-integration-test-${STAGE} \
20+ DEPLOY_OUTPUT= $( gcloud functions deploy dd-trace-js-sls-mini-agent-integration-test-${STAGE} \
2121 --gen2 \
2222 --runtime=nodejs18 \
2323 --region=us-east1 \
24+ --project=datadog-sandbox \
2425 --source " ${SERVERLESS_INTEGRATION_DIR_PATH} /test-project/" \
2526 --entry-point=helloGET \
2627 --trigger-http \
2728 --allow-unauthenticated \
28- --env-vars-file " ${SERVERLESS_INTEGRATION_DIR_PATH} /test-project/.env.yaml"
29+ --env-vars-file " ${SERVERLESS_INTEGRATION_DIR_PATH} /test-project/.env.yaml" )
30+
31+ INVOKE_URL=$( echo " $DEPLOY_OUTPUT " | awk ' END {print $NF}' )
2932
3033echo " Calling deployed cloud function"
3134
32- curl -s " https://us-east1-datadog-sandbox.cloudfunctions.net/dd-trace-js-sls-mini-agent-integration-test- ${STAGE }"
35+ curl -s " ${INVOKE_URL }"
3336
34- echo " Waiting 1 minute before tailing logs"
37+ echo " Waiting 60 seconds before tailing logs"
3538sleep 60
3639
37- LOGS=$( gcloud functions logs read dd-trace-js-sls-mini-agent-integration-test-${STAGE} --region us-east1 --gen2 --limit 1000)
40+ LOGS=$( gcloud functions logs read dd-trace-js-sls-mini-agent-integration-test-${STAGE} --region us-east1 --gen2 --limit 1000 --project datadog-sandbox )
3841
3942echo " $LOGS "
4043
You can’t perform that action at this time.
0 commit comments