aboutsummaryrefslogtreecommitdiff
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.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() {
71 --ebics-user-id=$1 \ 71 --ebics-user-id=$1 \
72 $3 > /dev/null 72 $3 > /dev/null
73 echo " OK" 73 echo " OK"
74 sleep 1
75 echo -n Connecting $3 .. 74 echo -n Connecting $3 ..
76 libeufin-cli connections connect $3 > /dev/null 75 libeufin-cli connections connect $3 > /dev/null
77 echo " OK" 76 echo " OK"
78 sleep 1
79 echo -n "Importing Sandbox bank account ($5) to Nexus ($4) ..." 77 echo -n "Importing Sandbox bank account ($5) to Nexus ($4) ..."
80 libeufin-cli connections download-bank-accounts $3 > /dev/null 78 libeufin-cli connections download-bank-accounts $3 > /dev/null
81 sleep 1
82 libeufin-cli connections import-bank-account \ 79 libeufin-cli connections import-bank-account \
83 --offered-account-id=$5 --nexus-bank-account-id=$4 $3 > /dev/null 80 --offered-account-id=$5 --nexus-bank-account-id=$4 $3 > /dev/null
84 echo " OK" 81 echo " OK"
@@ -93,7 +90,6 @@ function prepare_anastasis_facade() {
93 --facade-name=$1 \ 90 --facade-name=$1 \
94 $2 $3 91 $2 $3
95 echo " OK" 92 echo " OK"
96 sleep 1
97 # No need to setup facade permissions, as the anastasis client 93 # No need to setup facade permissions, as the anastasis client
98 # is superuser at Nexus. 94 # is superuser at Nexus.
99} 95}
@@ -149,18 +145,17 @@ export R1FILE
149## DO WORK 145## DO WORK
150#echo " DONE" 146#echo " DONE"
151 147
152if ! libeufin-cli --version &> /dev/null; then 148echo -n "Testing for libeufin-cli"
153 exit_skip "libeufin-cli not found" 149libeufin-cli --version > /dev/null || exit_skip "libeufin-cli required"
154fi 150echo " FOUND"
155
156if ! libeufin-nexus --version &> /dev/null; then
157 exit_skip "libeufin-nexus not found"
158fi
159 151
160if ! libeufin-sandbox --version &> /dev/null; then 152echo -n "Testing for libeufin-nexus"
161 exit_skip "libeufin-sandbox not found" 153libeufin-nexus --version > /dev/null || exit_skip "libeufin-nexus required"
162fi 154echo " FOUND"
163 155
156echo -n "Testing for libeufin-sandbox"
157libeufin-sandbox --version > /dev/null || exit_skip "libeufin-sandbox required"
158echo " FOUND"
164 159
165# Check we can actually run 160# Check we can actually run
166echo -n "Testing for jq" 161echo -n "Testing for jq"
@@ -261,7 +256,6 @@ libeufin-cli facades new-anastasis-facade \
261 --facade-name=facade-credit \ 256 --facade-name=facade-credit \
262 bankconnection-credit nexus-bankaccount-credit 257 bankconnection-credit nexus-bankaccount-credit
263echo " OK" 258echo " OK"
264sleep 1
265FACADE_URL=$(libeufin-cli facades list | jq .facades[0].baseUrl | tr -d \") 259FACADE_URL=$(libeufin-cli facades list | jq .facades[0].baseUrl | tr -d \")
266 260
267## Reach facade with: $FACADE_URL + $CREDIT_USERNAME + $CREDIT_PASSWORD 261## Reach facade with: $FACADE_URL + $CREDIT_USERNAME + $CREDIT_PASSWORD