diff options
author | Christian Grothoff <christian@grothoff.org> | 2023-01-17 21:57:07 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2023-01-17 21:57:07 +0100 |
commit | 4ae2d095b860ab4f476b2ed7df8123a5618bacd6 (patch) | |
tree | 86f09f55345d634fa06a181598a08e7cb467cd2a | |
parent | 3223c6cc64a5226119e19dbbfae4b32120537356 (diff) | |
download | anastasis-4ae2d095b860ab4f476b2ed7df8123a5618bacd6.tar.gz anastasis-4ae2d095b860ab4f476b2ed7df8123a5618bacd6.zip |
Taler 0.9.0 migrations for cli tests
-rwxr-xr-x | src/cli/test_anastasis_reducer_recovery_enter_user_attributes.sh | 39 |
1 files changed, 31 insertions, 8 deletions
diff --git a/src/cli/test_anastasis_reducer_recovery_enter_user_attributes.sh b/src/cli/test_anastasis_reducer_recovery_enter_user_attributes.sh index 49814cd..b32dd5d 100755 --- a/src/cli/test_anastasis_reducer_recovery_enter_user_attributes.sh +++ b/src/cli/test_anastasis_reducer_recovery_enter_user_attributes.sh | |||
@@ -15,6 +15,27 @@ function exit_fail() { | |||
15 | exit 1 | 15 | exit 1 |
16 | } | 16 | } |
17 | 17 | ||
18 | # Stop libeufin sandbox and nexus (if running) | ||
19 | function stop_libeufin() | ||
20 | { | ||
21 | echo "Stopping libeufin..." | ||
22 | if test -f libeufin-sandbox.pid | ||
23 | then | ||
24 | PID=`cat libeufin-sandbox.pid 2> /dev/null` | ||
25 | echo "Killing libeufin sandbox $PID" | ||
26 | rm libeufin-sandbox.pid | ||
27 | kill $PID 2> /dev/null || true | ||
28 | fi | ||
29 | if test -f libeufin-nexus.pid | ||
30 | then | ||
31 | PID=`cat libeufin-nexus.pid 2> /dev/null` | ||
32 | echo "Killing libeufin nexus $PID" | ||
33 | rm libeufin-nexus.pid | ||
34 | kill $PID 2> /dev/null || true | ||
35 | fi | ||
36 | echo "Stopping libeufin DONE" | ||
37 | } | ||
38 | |||
18 | # Cleanup to run whenever we exit | 39 | # Cleanup to run whenever we exit |
19 | function cleanup() | 40 | function cleanup() |
20 | { | 41 | { |
@@ -22,6 +43,7 @@ function cleanup() | |||
22 | do | 43 | do |
23 | kill $n 2> /dev/null || true | 44 | kill $n 2> /dev/null || true |
24 | done | 45 | done |
46 | stop_libeufin | ||
25 | rm -rf $CONF $WALLET_DB $R1FILE $R2FILE $B1FILE $B2FILE $TMP_DIR | 47 | rm -rf $CONF $WALLET_DB $R1FILE $R2FILE $B1FILE $B2FILE $TMP_DIR |
26 | wait | 48 | wait |
27 | } | 49 | } |
@@ -91,8 +113,8 @@ taler-exchange-httpd -h > /dev/null || exit_skip " taler-exchange required" | |||
91 | taler-merchant-httpd -h > /dev/null || exit_skip " taler-merchant required" | 113 | taler-merchant-httpd -h > /dev/null || exit_skip " taler-merchant required" |
92 | echo " FOUND" | 114 | echo " FOUND" |
93 | 115 | ||
94 | echo -n "Testing for taler-bank-manage" | 116 | echo -n "Testing for taler-bank-manage-testing" |
95 | taler-bank-manage --help >/dev/null </dev/null || exit_skip " MISSING" | 117 | taler-bank-manage-testing --help >/dev/null </dev/null || exit_skip " MISSING" |
96 | echo " FOUND" | 118 | echo " FOUND" |
97 | echo -n "Testing for taler-wallet-cli" | 119 | echo -n "Testing for taler-wallet-cli" |
98 | taler-wallet-cli -v >/dev/null </dev/null || exit_skip " MISSING" | 120 | taler-wallet-cli -v >/dev/null </dev/null || exit_skip " MISSING" |
@@ -140,8 +162,8 @@ MASTER_PUB=`gnunet-ecc -p $MASTER_PRIV_FILE` | |||
140 | EXCHANGE_URL=`taler-config -c $CONF -s EXCHANGE -o BASE_URL` | 162 | EXCHANGE_URL=`taler-config -c $CONF -s EXCHANGE -o BASE_URL` |
141 | MERCHANT_PORT=`taler-config -c $CONF -s MERCHANT -o PORT` | 163 | MERCHANT_PORT=`taler-config -c $CONF -s MERCHANT -o PORT` |
142 | MERCHANT_URL=http://localhost:${MERCHANT_PORT}/ | 164 | MERCHANT_URL=http://localhost:${MERCHANT_PORT}/ |
143 | BANK_PORT=`taler-config -c $CONF -s BANK -o HTTP_PORT` | 165 | NEXUS_PORT=8082 |
144 | BANK_URL=http://localhost:${BANK_PORT}/ | 166 | BANK_URL=http://localhost:1${NEXUS_PORT}/ |
145 | AUDITOR_URL=http://localhost:8083/ | 167 | AUDITOR_URL=http://localhost:8083/ |
146 | AUDITOR_PRIV_FILE=`taler-config -f -c $CONF -s AUDITOR -o AUDITOR_PRIV_FILE` | 168 | AUDITOR_PRIV_FILE=`taler-config -f -c $CONF -s AUDITOR -o AUDITOR_PRIV_FILE` |
147 | AUDITOR_PRIV_DIR=`dirname $AUDITOR_PRIV_FILE` | 169 | AUDITOR_PRIV_DIR=`dirname $AUDITOR_PRIV_FILE` |
@@ -176,7 +198,8 @@ echo " OK" | |||
176 | 198 | ||
177 | # Launch services | 199 | # Launch services |
178 | echo -n "Launching taler services ..." | 200 | echo -n "Launching taler services ..." |
179 | taler-bank-manage-testing $CONF postgres:///$TALER_DB serve > taler-bank.log 2> taler-bank.err & | 201 | rm -f $TALER_DB |
202 | taler-bank-manage-testing $NEXUS_PORT $TALER_DB $EXCHANGE_URL $CONF > taler-bank.log 2> taler-bank.err & | ||
180 | taler-exchange-secmod-eddsa -c $CONF 2> taler-exchange-secmod-eddsa.log & | 203 | taler-exchange-secmod-eddsa -c $CONF 2> taler-exchange-secmod-eddsa.log & |
181 | taler-exchange-secmod-rsa -c $CONF 2> taler-exchange-secmod-rsa.log & | 204 | taler-exchange-secmod-rsa -c $CONF 2> taler-exchange-secmod-rsa.log & |
182 | taler-exchange-secmod-cs -c $CONF 2> taler-exchange-secmod-cs.log & | 205 | taler-exchange-secmod-cs -c $CONF 2> taler-exchange-secmod-cs.log & |
@@ -238,9 +261,9 @@ echo -n "Setting up keys ..." | |||
238 | taler-exchange-offline -c $CONF \ | 261 | taler-exchange-offline -c $CONF \ |
239 | download \ | 262 | download \ |
240 | sign \ | 263 | sign \ |
241 | enable-account payto://x-taler-bank/localhost/Exchange \ | 264 | enable-account `taler-config -c $CONF -s exchange-account-1 -o PAYTO_URI` \ |
242 | enable-auditor $AUDITOR_PUB $AUDITOR_URL "TESTKUDOS Auditor" \ | 265 | enable-auditor $AUDITOR_PUB $AUDITOR_URL "TESTKUDOS Auditor" \ |
243 | wire-fee now x-taler-bank TESTKUDOS:0.01 TESTKUDOS:0.01 TESTKUDOS:0.01 \ | 266 | wire-fee now iban TESTKUDOS:0.01 TESTKUDOS:0.01 \ |
244 | upload &> taler-exchange-offline.log | 267 | upload &> taler-exchange-offline.log |
245 | 268 | ||
246 | echo -n "." | 269 | echo -n "." |
@@ -295,7 +318,7 @@ echo "OK" | |||
295 | echo -n "Configuring merchant instance ..." | 318 | echo -n "Configuring merchant instance ..." |
296 | # Setup merchant | 319 | # Setup merchant |
297 | 320 | ||
298 | curl -H "Content-Type: application/json" -X POST -d '{"auth":{"method":"external"},"payto_uris":["payto://x-taler-bank/localhost/43"],"id":"default","name":"default","address":{},"jurisdiction":{},"default_max_wire_fee":"TESTKUDOS:1", "default_max_deposit_fee":"TESTKUDOS:1","default_wire_fee_amortization":1,"default_wire_transfer_delay":{"d_ms" : 3600000},"default_pay_delay":{"d_ms": 3600000}}' http://localhost:9966/management/instances | 321 | curl -H "Content-Type: application/json" -X POST -d '{"auth":{"method":"external"},"payto_uris":["payto://x-taler-bank/localhost/43"],"id":"default","name":"default","address":{},"jurisdiction":{},"default_max_wire_fee":"TESTKUDOS:1", "default_max_deposit_fee":"TESTKUDOS:1","default_wire_fee_amortization":1,"default_wire_transfer_delay":{"d_us" : 3600000000},"default_pay_delay":{"d_us": 3600000000}}' http://localhost:9966/management/instances |
299 | 322 | ||
300 | 323 | ||
301 | echo " DONE" | 324 | echo " DONE" |