diff options
author | MS <ms@taler.net> | 2023-01-11 16:29:10 +0100 |
---|---|---|
committer | MS <ms@taler.net> | 2023-01-11 16:29:10 +0100 |
commit | 4f514abead3961805385f69671ebceac88e967f7 (patch) | |
tree | d5a2741bee7f47d915bdf62d043cdd79be4b2f71 /src/cli/test_iban.sh | |
parent | 15774dbdcc9de1db1cedec1979d5a8d289f7feba (diff) | |
download | anastasis-4f514abead3961805385f69671ebceac88e967f7.tar.gz anastasis-4f514abead3961805385f69671ebceac88e967f7.tar.bz2 anastasis-4f514abead3961805385f69671ebceac88e967f7.zip |
tests: fix libeufin user registration.
Diffstat (limited to 'src/cli/test_iban.sh')
-rwxr-xr-x | src/cli/test_iban.sh | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/src/cli/test_iban.sh b/src/cli/test_iban.sh index 8278961..135ab02 100755 --- a/src/cli/test_iban.sh +++ b/src/cli/test_iban.sh @@ -29,26 +29,21 @@ function cleanup() # $1=ebics username, $2=ebics partner name, $3=person name, $4=sandbox bank account name, $5=iban function prepare_sandbox_account() { - echo -n "Activating ebics subscriber $1 at the sandbox ..." - libeufin-cli \ - sandbox --sandbox-url=$SANDBOX_URL \ - ebicssubscriber create \ - --host-id=$EBICS_HOST \ - --partner-id=$2 \ - --user-id=$1 + echo -n "Registering $4 to the Sandbox..." + export LIBEUFIN_SANDBOX_USERNAME=$4 + export LIBEUFIN_SANDBOX_PASSWORD=unused + libeufin-cli sandbox --sandbox-url=$SANDBOX_URL demobank register --name "$3" echo " OK" - echo -n "Giving a bank account ($4) to $1 ..." - libeufin-cli \ - sandbox --sandbox-url=$SANDBOX_URL \ - ebicsbankaccount create \ - --iban=$5 \ - --bic="BCMAESM1XXX"\ - --person-name="$3" \ - --account-name=$4 \ - --ebics-user-id=$1 \ - --ebics-host-id=$EBICS_HOST \ - --ebics-partner-id=$2 + echo -n "Associating a EBICS subscriber to $4..." + export LIBEUFIN_SANDBOX_USERNAME=admin + libeufin-cli sandbox --sandbox-url=$SANDBOX_URL demobank new-ebicssubscriber \ + --host-id $EBICS_HOST \ + --user-id $1 --partner-id $2 \ + --bank-account $4 # that's a username _and_ a bank account name echo " OK" + + unset LIBEUFIN_SANDBOX_USERNAME + unset LIBEUFIN_SANDBOX_PASSWORD } function sync_providers() { @@ -189,6 +184,9 @@ if ! curl -s --retry 5 --retry-connrefused $NEXUS_URL > /dev/null; then fi echo " OK" +echo -n "Configuring Sandbox..." +libeufin-sandbox config default &> sandbox.log +echo " OK" echo -n "Starting Sandbox ..." libeufin-sandbox serve --no-auth &> sandbox.log & sandbox_pid=$! @@ -204,7 +202,7 @@ EBICS_HOST="ebicstesthost" export IBAN_CREDIT="DE89370400440532013000" export IBAN_DEBIT="FR1420041010050500013M02606" -echo -n "Preparing Sandbox ..." +echo -n "Preparing Sandbox (creating the EBICS host) ..." libeufin-cli \ sandbox --sandbox-url=$SANDBOX_URL \ ebicshost create \ |