From 6d00761ebbce8473a3905a910e534b72fb91e7cc Mon Sep 17 00:00:00 2001 From: MS Date: Sun, 22 Aug 2021 20:45:49 -1100 Subject: Anastasis/LibEuFin test. Avoid if-statement to check whether programs are installed, and remove the extra-cautious "sleep 1". --- src/cli/test_iban.sh | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/cli/test_iban.sh b/src/cli/test_iban.sh index fe6f59c..cd0423b 100755 --- a/src/cli/test_iban.sh +++ b/src/cli/test_iban.sh @@ -71,14 +71,11 @@ function prepare_nexus_account() { --ebics-user-id=$1 \ $3 > /dev/null echo " OK" - sleep 1 echo -n Connecting $3 .. libeufin-cli connections connect $3 > /dev/null echo " OK" - sleep 1 echo -n "Importing Sandbox bank account ($5) to Nexus ($4) ..." libeufin-cli connections download-bank-accounts $3 > /dev/null - sleep 1 libeufin-cli connections import-bank-account \ --offered-account-id=$5 --nexus-bank-account-id=$4 $3 > /dev/null echo " OK" @@ -93,7 +90,6 @@ function prepare_anastasis_facade() { --facade-name=$1 \ $2 $3 echo " OK" - sleep 1 # No need to setup facade permissions, as the anastasis client # is superuser at Nexus. } @@ -149,18 +145,17 @@ export R1FILE ## DO WORK #echo " DONE" -if ! libeufin-cli --version &> /dev/null; then - exit_skip "libeufin-cli not found" -fi - -if ! libeufin-nexus --version &> /dev/null; then - exit_skip "libeufin-nexus not found" -fi +echo -n "Testing for libeufin-cli" +libeufin-cli --version > /dev/null || exit_skip "libeufin-cli required" +echo " FOUND" -if ! libeufin-sandbox --version &> /dev/null; then - exit_skip "libeufin-sandbox not found" -fi +echo -n "Testing for libeufin-nexus" +libeufin-nexus --version > /dev/null || exit_skip "libeufin-nexus required" +echo " FOUND" +echo -n "Testing for libeufin-sandbox" +libeufin-sandbox --version > /dev/null || exit_skip "libeufin-sandbox required" +echo " FOUND" # Check we can actually run echo -n "Testing for jq" @@ -261,7 +256,6 @@ libeufin-cli facades new-anastasis-facade \ --facade-name=facade-credit \ bankconnection-credit nexus-bankaccount-credit echo " OK" -sleep 1 FACADE_URL=$(libeufin-cli facades list | jq .facades[0].baseUrl | tr -d \") ## Reach facade with: $FACADE_URL + $CREDIT_USERNAME + $CREDIT_PASSWORD -- cgit v1.2.3