summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMS <ms@taler.net>2021-08-22 20:45:49 -1100
committerMS <ms@taler.net>2021-08-22 20:45:49 -1100
commit6d00761ebbce8473a3905a910e534b72fb91e7cc (patch)
treede23895f8c0c3309a61bb0b41288e3dc1e298ff9
parent082248b9b72f1db4ab2662b655a60445549882e3 (diff)
downloadanastasis-6d00761ebbce8473a3905a910e534b72fb91e7cc.tar.gz
anastasis-6d00761ebbce8473a3905a910e534b72fb91e7cc.tar.bz2
anastasis-6d00761ebbce8473a3905a910e534b72fb91e7cc.zip
Anastasis/LibEuFin test.
Avoid if-statement to check whether programs are installed, and remove the extra-cautious "sleep 1".
-rwxr-xr-xsrc/cli/test_iban.sh24
1 files changed, 9 insertions, 15 deletions
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