From 9420f582e9c659b9aa8238fdf94033ece12ad4eb Mon Sep 17 00:00:00 2001 From: Robert-Jan Huijsman Date: Thu, 14 Sep 2017 14:53:51 -0700 Subject: [PATCH] Fix to integration test for preprod-endpoint of Cloud Functions. The Cloud Functions team has a "preprod" endpoint that generates an alternative URL for the HTTP functions it creates. This PR adds support for that endpoint and its alternative domain. --- integration_test/run_tests.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/integration_test/run_tests.sh b/integration_test/run_tests.sh index 156332f2a..39ad21230 100755 --- a/integration_test/run_tests.sh +++ b/integration_test/run_tests.sh @@ -57,7 +57,11 @@ function run_tests { # Construct the URL for the test function. This may change in the future, # causing this script to start failing, but currently we don't have a very # reliable way of determining the URL dynamically. - TEST_URL=https://us-central1-$PROJECT_ID.cloudfunctions.net/integrationTests + TEST_DOMAIN="cloudfunctions.net" + if [[ $FIREBASE_FUNCTIONS_URL == "https://preprod-cloudfunctions.sandbox.googleapis.com" ]]; then + TEST_DOMAIN="txcloud.net" + fi + TEST_URL="https://us-central1-$PROJECT_ID.$TEST_DOMAIN/integrationTests" echo $TEST_URL curl --fail $TEST_URL