aboutsummaryrefslogtreecommitdiff
path: root/src/testing/initialize_taler_system.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/initialize_taler_system.sh')
-rwxr-xr-xsrc/testing/initialize_taler_system.sh34
1 files changed, 28 insertions, 6 deletions
diff --git a/src/testing/initialize_taler_system.sh b/src/testing/initialize_taler_system.sh
index 15e59988..b66780a1 100755
--- a/src/testing/initialize_taler_system.sh
+++ b/src/testing/initialize_taler_system.sh
@@ -138,10 +138,6 @@ taler-auditor-httpd -L INFO -c $CONF 2> taler-auditor-httpd.log &
138 138
139echo " OK" 139echo " OK"
140 140
141echo -n "Wait RSA service to build keys..."
142( tail -f -n0 taler-exchange-secmod-rsa.log & ) | grep -q "Sending RSA SYNCED message"
143echo " done"
144
145echo -n "Waiting for the bank" 141echo -n "Waiting for the bank"
146# Wait for bank to be available (usually the slowest) 142# Wait for bank to be available (usually the slowest)
147for n in `seq 1 50` 143for n in `seq 1 50`
@@ -159,12 +155,14 @@ if [ 1 != $OK ]
159then 155then
160 exit_skip "Failed to launch services (bank)" 156 exit_skip "Failed to launch services (bank)"
161fi 157fi
158echo " OK"
162 159
160echo -n "Waiting for taler services "
163# Wait for all other taler services to be available 161# Wait for all other taler services to be available
164for n in `seq 1 50` 162for n in `seq 1 10`
165do 163do
166 echo -n "." 164 echo -n "."
167 sleep 0.1 165 sleep 1
168 OK=0 166 OK=0
169 # exchange 167 # exchange
170 wget --tries=1 --timeout=1 http://localhost:8081/seed -o /dev/null -O /dev/null >/dev/null || continue 168 wget --tries=1 --timeout=1 http://localhost:8081/seed -o /dev/null -O /dev/null >/dev/null || continue
@@ -183,6 +181,30 @@ fi
183 181
184echo "OK" 182echo "OK"
185 183
184set +e
185echo -n 'Wait the exchange for gather its keys '
186for n in `seq 1 10`
187do
188 echo -n "."
189 sleep 1
190 OK=0
191 # exchange
192 wget --tries=3 --waitretry=0 --timeout=1 http://localhost:8081/management/keys -o /dev/null -O $LAST_RESPONSE >/dev/null
193 DENOMS_COUNT=`jq '.future_denoms|length' < $LAST_RESPONSE`
194 SIGNKEYS_COUNT=`jq '.future_signkeys|length' < $LAST_RESPONSE`
195 [[ -z "$SIGNKEYS_COUNT" || "$SIGNKEYS_COUNT" == "0" || -z "$DENOMS_COUNT" || "$DENOMS_COUNT" == "0" ]] && continue
196 OK=1
197 break;
198done
199set -e
200
201if [ 1 != $OK ]
202then
203 exit_skip "Failed to setup exchange keys, check secmod logs"
204fi
205
206echo " OK"
207
186echo -n "Setting up keys ..." 208echo -n "Setting up keys ..."
187taler-exchange-offline -c $CONF \ 209taler-exchange-offline -c $CONF \
188 download \ 210 download \