summaryrefslogtreecommitdiff
path: root/src/cli/test_iban.sh
blob: e43dc107987a58a6e563410af4dd7ec452f17c33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash

set -eu

# Script's guidelines:

#* uses 'CURRENCY=TESTKUDOS' and uses $CURRENCY for all
#  currencies in what follows ...
#* for databases, use either 'anastasischeck' for Postgres
#  or an sqlite file created via "mktemp /tmp/test-XXXXXX"
#  or something like that
#* exits with 77 if libeufin is not properly installed/available
#* exits with 77 if Postgres with 'anastasischeck' is not properly
#  installed/available
#* starts Nexus (in background)
#* starts sandbox (in background)
#* creates two IBAN accounts
#* stores IBANs of both accounts in shell variables,
#  call them IBAN_CREDIT and IBAN_DEBIT.
#* configures an Anastasis facade for IBAN_CREDIT.
#* exports authentication credentials (URL, access token)
#  for the facade to shell variables
#  (FACADE_URL, FACADE_AUTH_TOKEN)
#* contains a command to do a wire-transfer (pick your amount)
#  from DEBIT to CREDIT (setup authentication as needed to
#  trigger the transfer)
#
#
#Make sure 'set -eu' and include some progress indicators, like:
#
#echo -n "Starting nexus ..."
## DO WORK
#echo " DONE"
#echo -n "Starting sandbox ..."
## DO WORK
#echo " DONE"