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 /src/cli | |
parent | 3223c6cc64a5226119e19dbbfae4b32120537356 (diff) | |
download | anastasis-4ae2d095b860ab4f476b2ed7df8123a5618bacd6.tar.gz anastasis-4ae2d095b860ab4f476b2ed7df8123a5618bacd6.tar.bz2 anastasis-4ae2d095b860ab4f476b2ed7df8123a5618bacd6.zip |
Taler 0.9.0 migrations for cli tests
Diffstat (limited to 'src/cli')
-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() { exit 1 } +# Stop libeufin sandbox and nexus (if running) +function stop_libeufin() +{ + echo "Stopping libeufin..." + if test -f libeufin-sandbox.pid + then + PID=`cat libeufin-sandbox.pid 2> /dev/null` + echo "Killing libeufin sandbox $PID" + rm libeufin-sandbox.pid + kill $PID 2> /dev/null || true + fi + if test -f libeufin-nexus.pid + then + PID=`cat libeufin-nexus.pid 2> /dev/null` + echo "Killing libeufin nexus $PID" + rm libeufin-nexus.pid + kill $PID 2> /dev/null || true + fi + echo "Stopping libeufin DONE" +} + # Cleanup to run whenever we exit function cleanup() { @@ -22,6 +43,7 @@ function cleanup() do kill $n 2> /dev/null || true done + stop_libeufin rm -rf $CONF $WALLET_DB $R1FILE $R2FILE $B1FILE $B2FILE $TMP_DIR wait } @@ -91,8 +113,8 @@ taler-exchange-httpd -h > /dev/null || exit_skip " taler-exchange required" taler-merchant-httpd -h > /dev/null || exit_skip " taler-merchant required" echo " FOUND" -echo -n "Testing for taler-bank-manage" -taler-bank-manage --help >/dev/null </dev/null || exit_skip " MISSING" +echo -n "Testing for taler-bank-manage-testing" +taler-bank-manage-testing --help >/dev/null </dev/null || exit_skip " MISSING" echo " FOUND" echo -n "Testing for taler-wallet-cli" taler-wallet-cli -v >/dev/null </dev/null || exit_skip " MISSING" @@ -140,8 +162,8 @@ MASTER_PUB=`gnunet-ecc -p $MASTER_PRIV_FILE` EXCHANGE_URL=`taler-config -c $CONF -s EXCHANGE -o BASE_URL` MERCHANT_PORT=`taler-config -c $CONF -s MERCHANT -o PORT` MERCHANT_URL=http://localhost:${MERCHANT_PORT}/ -BANK_PORT=`taler-config -c $CONF -s BANK -o HTTP_PORT` -BANK_URL=http://localhost:${BANK_PORT}/ +NEXUS_PORT=8082 +BANK_URL=http://localhost:1${NEXUS_PORT}/ AUDITOR_URL=http://localhost:8083/ AUDITOR_PRIV_FILE=`taler-config -f -c $CONF -s AUDITOR -o AUDITOR_PRIV_FILE` AUDITOR_PRIV_DIR=`dirname $AUDITOR_PRIV_FILE` @@ -176,7 +198,8 @@ echo " OK" # Launch services echo -n "Launching taler services ..." -taler-bank-manage-testing $CONF postgres:///$TALER_DB serve > taler-bank.log 2> taler-bank.err & +rm -f $TALER_DB +taler-bank-manage-testing $NEXUS_PORT $TALER_DB $EXCHANGE_URL $CONF > taler-bank.log 2> taler-bank.err & taler-exchange-secmod-eddsa -c $CONF 2> taler-exchange-secmod-eddsa.log & taler-exchange-secmod-rsa -c $CONF 2> taler-exchange-secmod-rsa.log & taler-exchange-secmod-cs -c $CONF 2> taler-exchange-secmod-cs.log & @@ -238,9 +261,9 @@ echo -n "Setting up keys ..." taler-exchange-offline -c $CONF \ download \ sign \ - enable-account payto://x-taler-bank/localhost/Exchange \ + enable-account `taler-config -c $CONF -s exchange-account-1 -o PAYTO_URI` \ enable-auditor $AUDITOR_PUB $AUDITOR_URL "TESTKUDOS Auditor" \ - wire-fee now x-taler-bank TESTKUDOS:0.01 TESTKUDOS:0.01 TESTKUDOS:0.01 \ + wire-fee now iban TESTKUDOS:0.01 TESTKUDOS:0.01 \ upload &> taler-exchange-offline.log echo -n "." @@ -295,7 +318,7 @@ echo "OK" echo -n "Configuring merchant instance ..." # Setup merchant -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 +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 echo " DONE" |