diff options
author | MS <ms@taler.net> | 2021-08-22 20:45:49 -1100 |
---|---|---|
committer | MS <ms@taler.net> | 2021-08-22 20:45:49 -1100 |
commit | 6d00761ebbce8473a3905a910e534b72fb91e7cc (patch) | |
tree | de23895f8c0c3309a61bb0b41288e3dc1e298ff9 | |
parent | 082248b9b72f1db4ab2662b655a60445549882e3 (diff) | |
download | anastasis-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-x | src/cli/test_iban.sh | 24 |
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 | ||
152 | if ! libeufin-cli --version &> /dev/null; then | 148 | echo -n "Testing for libeufin-cli" |
153 | exit_skip "libeufin-cli not found" | 149 | libeufin-cli --version > /dev/null || exit_skip "libeufin-cli required" |
154 | fi | 150 | echo " FOUND" |
155 | |||
156 | if ! libeufin-nexus --version &> /dev/null; then | ||
157 | exit_skip "libeufin-nexus not found" | ||
158 | fi | ||
159 | 151 | ||
160 | if ! libeufin-sandbox --version &> /dev/null; then | 152 | echo -n "Testing for libeufin-nexus" |
161 | exit_skip "libeufin-sandbox not found" | 153 | libeufin-nexus --version > /dev/null || exit_skip "libeufin-nexus required" |
162 | fi | 154 | echo " FOUND" |
163 | 155 | ||
156 | echo -n "Testing for libeufin-sandbox" | ||
157 | libeufin-sandbox --version > /dev/null || exit_skip "libeufin-sandbox required" | ||
158 | echo " FOUND" | ||
164 | 159 | ||
165 | # Check we can actually run | 160 | # Check we can actually run |
166 | echo -n "Testing for jq" | 161 | echo -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 |
263 | echo " OK" | 258 | echo " OK" |
264 | sleep 1 | ||
265 | FACADE_URL=$(libeufin-cli facades list | jq .facades[0].baseUrl | tr -d \") | 259 | FACADE_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 |