diff options
author | Marcello Stanisci <stanisci.m@gmail.com> | 2018-11-26 21:08:43 +0100 |
---|---|---|
committer | Marcello Stanisci <stanisci.m@gmail.com> | 2018-11-28 09:56:39 +0100 |
commit | 2b12fd371c4950eb99cda97ccadce7768ae1b78d (patch) | |
tree | 3b9d34da277c8025500fd881fab7d516fe4947dc /buildbot | |
parent | cc275fbe5d5b5c5f4d6a7bf263d919a41d7ce94a (diff) | |
download | deployment-2b12fd371c4950eb99cda97ccadce7768ae1b78d.tar.gz deployment-2b12fd371c4950eb99cda97ccadce7768ae1b78d.tar.bz2 deployment-2b12fd371c4950eb99cda97ccadce7768ae1b78d.zip |
Web-services-check script constructs URLs based on env.
Diffstat (limited to 'buildbot')
-rwxr-xr-x | buildbot/checks.sh | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/buildbot/checks.sh b/buildbot/checks.sh index 4126095..076cfce 100755 --- a/buildbot/checks.sh +++ b/buildbot/checks.sh @@ -2,6 +2,12 @@ active=$(sudo -u test cat /home/test/active) nonactive="blue" + +if test -z ${DEPLOYMENT}; then + echo "Please export env variable DEPLOYMENT=(test|demo) before running this script" + exit 1 +fi + echo "Active party: ${active}" if test $active = "test-blue"; then @@ -22,7 +28,7 @@ error_fmt="%s (http status code: %s)/(curl exit code: %s - %s)\n" http_status_code=$(curl \ -H "X-Taler-Deployment-Color: $nonactive" \ - -s https://exchange.test.taler.net/ -o /dev/null \ + -s https://exchange.${DEPLOYMENT}.taler.net/ -o /dev/null \ -w "%{http_code}") if ! test 200 = $http_status_code; then printf "$error_fmt" \ @@ -33,7 +39,7 @@ fi http_status_code=$(curl \ -H "X-Taler-Deployment-Color: $nonactive" \ - -s http://backend.test.taler.net/ \ + -s http://backend.${DEPLOYMENT}.taler.net/ \ --header "Authorization: ApiKey sandbox" \ -o /dev/null \ -w "%{http_code}") @@ -46,7 +52,7 @@ fi http_status_code=$(curl \ -H "X-Taler-Deployment-Color: $nonactive" \ - -s https://shop.test.taler.net/ -o /dev/null \ + -s https://shop.${DEPLOYMENT}.taler.net/ -o /dev/null \ -w "%{http_code}") if ! test 200 = $http_status_code; then printf "$error_fmt" \ @@ -57,7 +63,7 @@ fi http_status_code=$(curl \ -H "X-Taler-Deployment-Color: $nonactive" \ - -s https://donations.test.taler.net/ -o /dev/null \ + -s https://donations.${DEPLOYMENT}.taler.net/ -o /dev/null \ -w "%{http_code}") if ! test 200 = $http_status_code; then printf "$error_fmt" \ @@ -68,7 +74,7 @@ fi http_status_code=$(curl \ -H "X-Taler-Deployment-Color: $nonactive" \ - -s https://bank.test.taler.net/ -o /dev/null \ + -s https://bank.${DEPLOYMENT}.taler.net/ -o /dev/null \ -w "%{http_code}") if ! test 302 = $http_status_code; then printf "$error_fmt" \ @@ -79,7 +85,7 @@ fi http_status_code=$(curl \ -H "X-Taler-Deployment-Color: $nonactive" \ - -s https://test.taler.net/en/index.html -o /dev/null \ + -s https://${DEPLOYMENT}.taler.net/en/index.html -o /dev/null \ -w "%{http_code}") if ! test 200 = $http_status_code; then printf "$error_fmt" \ |