summaryrefslogtreecommitdiff
path: root/buildbot/checks.sh
diff options
context:
space:
mode:
Diffstat (limited to 'buildbot/checks.sh')
-rwxr-xr-xbuildbot/checks.sh69
1 files changed, 31 insertions, 38 deletions
diff --git a/buildbot/checks.sh b/buildbot/checks.sh
index 02e2b93..7eb331e 100755
--- a/buildbot/checks.sh
+++ b/buildbot/checks.sh
@@ -25,6 +25,7 @@ error_stringify ()
error_fmt="%s (http status code: %s)/(curl condition: %s - %s)\n"
+echo -n "Check exchange..."
URL="https://exchange.${DEPLOYMENT}.${DOMAIN}/"
http_status_code=$(curl \
-s "$URL" -o /dev/null \
@@ -36,11 +37,12 @@ if ! test 200 = $http_status_code; then
$http_status_code $? "$(error_stringify $?)"
exit 1
fi
+echo OK
-URL="http://backend.${DEPLOYMENT}.${DOMAIN}/"
+echo -n "Check merchant backend..."
+URL="https://backend.${DEPLOYMENT}.${DOMAIN}/"
http_status_code=$(curl \
-s $URL \
- --header "Authorization: ApiKey sandbox" \
-o /dev/null \
-w "%{http_code}")
if ! test 200 = $http_status_code; then
@@ -50,8 +52,9 @@ if ! test 200 = $http_status_code; then
$http_status_code $? "$(error_stringify $?)"
exit 1
fi
+echo OK
-
+echo -n "Check blog..."
URL="https://shop.${DEPLOYMENT}.${DOMAIN}/"
http_status_code=$(curl \
-s $URL -o /dev/null \
@@ -63,7 +66,9 @@ if ! test 302 = $http_status_code; then
$http_status_code $? "$(error_stringify $?)"
exit 1
fi
+echo OK
+echo -n "Check survey..."
URL="https://survey.${DEPLOYMENT}.${DOMAIN}/"
http_status_code=$(curl \
-s $URL -o /dev/null \
@@ -75,7 +80,9 @@ if ! test 302 = $http_status_code; then
$http_status_code $? "$(error_stringify $?)"
exit 1
fi
+echo OK
+echo -n "Check donations..."
URL="https://donations.${DEPLOYMENT}.${DOMAIN}/"
http_status_code=$(curl \
-s $URL -o /dev/null \
@@ -87,19 +94,37 @@ if ! test 302 = $http_status_code; then
$http_status_code $? "$(error_stringify $?)"
exit 1
fi
+echo OK
-URL="https://bank.${DEPLOYMENT}.${DOMAIN}/"
+echo -n "Check bank Web UI..."
+URL="https://bank.${DEPLOYMENT}.${DOMAIN}/webui/"
http_status_code=$(curl \
-s $URL -o /dev/null \
-w "%{http_code}")
-if ! test 302 = $http_status_code; then
+if ! test 200 = $http_status_code; then
printf "%s failed\n" $URL
printf "$error_fmt" \
"Bank did not restart correctly" \
$http_status_code $? "$(error_stringify $?)"
exit 1
fi
+echo OK
+echo -n "Check libEufin (Sandbox)..."
+URL="https://bank.${DEPLOYMENT}.${DOMAIN}/demobanks/default/integration-api/config"
+http_status_code=$(curl \
+ -s $URL -o /dev/null \
+ -w "%{http_code}")
+if ! test 200 = $http_status_code; then
+ printf "%s failed\n" $URL
+ printf "$error_fmt" \
+ "Bank did not restart correctly" \
+ $http_status_code $? "$(error_stringify $?)"
+ exit 1
+fi
+echo OK
+
+echo -n "Check landing page..."
URL="https://${DEPLOYMENT}.${DOMAIN}/en/index.html"
http_status_code=$(curl \
-s $URL -o /dev/null \
@@ -111,36 +136,4 @@ if ! test 200 = $http_status_code; then
$http_status_code $? "$(error_stringify $?)"
exit 1
fi
-
-
-
-if $(taler-config -s twister -o twister_deploy >& /dev/null); then
-
- for twister_url in "https://twister-backend.wild.gv.taler.net" \
- "https://twister-bank.wild.gv.taler.net" \
- "https://twister-exchange.wild.gv.taler.net"; do
- http_status_code=$(curl \
- -H "Authorization: ApiKey sandbox" \
- -s $twister_url -o /dev/null \
- -w "%{http_code}")
- if ! test 200 = $http_status_code; then
-
- if test 503 = $http_status_code; then
- printf "%s %s\n" \
- "Hit a '503 Service Unavailable' from Twister." \
- "Assuming all is correct."
- exit 0
- fi
-
- # Real failure here.
- printf "%s failed\n" $twister_url
- printf "$error_fmt" \
- "Twister did not restart correctly" \
- $http_status_code $? "$(error_stringify $?)"
- exit 1
- fi
- done
-fi
-
-
-printf "All services correctly restarted!\n"
+echo OK