summaryrefslogtreecommitdiff
path: root/buildbot/checks.sh
blob: 8b94c6c743d114379ba85480d66d94b13bd9bd25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash

active=$(sudo -u test cat /home/test/active)
nonactive="blue"
echo "Active party: ${active}"

if test $active = "test-blue"; then
  nonactive="green"
fi

if ! curl -H "X-Taler-Deployment-Color: $nonactive" -s https://exchange.test.taler.net/ &> /dev/null; then
  echo Exchange did not restart correctly
  exit 1
fi

if ! curl -H "X-Taler-Deployment-Color: $nonactive" -s http://backend.test.taler.net/ &> /dev/null; then
  echo Merchant backend did not restart correctly
  exit 1
fi

if ! curl -H "X-Taler-Deployment-Color: $nonactive" -s https://shop.test.taler.net/ &> /dev/null; then
  echo Blog did not restart correctly
  exit 1
fi

if ! curl -H "X-Taler-Deployment-Color: $nonactive" -s https://donations.test.taler.net/ &> /dev/null; then
  echo Donations shop did not restart correctly
  exit 1
fi

if ! curl -H "X-Taler-Deployment-Color: $nonactive" -s https://bank.test.taler.net/ &> /dev/null; then
  echo Bank did not restart correctly
  exit 1
fi

if ! curl -H "X-Taler-Deployment-Color: $nonactive" -s https://test.taler.net/ &> /dev/null; then
  echo Landing page did not restart correctly
  exit 1
fi