gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libeufin] branch master updated: tests


From: gnunet
Subject: [libeufin] branch master updated: tests
Date: Wed, 08 Feb 2023 16:48:29 +0100

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository libeufin.

The following commit(s) were added to refs/heads/master by this push:
     new 4995252f tests
4995252f is described below

commit 4995252f12d42705718e08535cf88c78ed0c615c
Author: MS <ms@taler.net>
AuthorDate: Wed Feb 8 16:36:38 2023 +0100

    tests
    
    adding a convenience script that launches both
    Sandbox and Nexus setting up a EBICS connection,
    to ease manual tests.
---
 cli/tests/launch_services.sh | 103 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 103 insertions(+)

diff --git a/cli/tests/launch_services.sh b/cli/tests/launch_services.sh
new file mode 100755
index 00000000..369b9bed
--- /dev/null
+++ b/cli/tests/launch_services.sh
@@ -0,0 +1,103 @@
+#!/bin/bash
+
+# Convenience script to setup and run a Sandbox + Nexus
+# EBICS pair, in order to try CLI commands.
+set -eu
+
+function exit_cleanup()
+{
+  echo "Running exit-cleanup"
+  for n in `jobs -p`
+    do
+      kill $n 2> /dev/null || true
+    done
+    wait || true
+    echo "DONE"
+}
+
+trap "exit_cleanup" EXIT
+echo RUNNING SANDBOX-NEXUS EBICS PAIR
+jq --version &> /dev/null || (echo "'jq' command not found"; exit 77)
+curl --version &> /dev/null || (echo "'curl' command not found"; exit 77)
+
+DB_PATH=/tmp/libeufin-cli-test.sqlite3
+export LIBEUFIN_SANDBOX_DB_CONNECTION=jdbc:sqlite:$DB_PATH
+
+echo -n Delete previous data...
+rm -f $DB_PATH
+echo DONE
+echo -n Configure the default demobank with MANA...
+libeufin-sandbox config --currency MANA default
+echo DONE
+echo -n Start the bank...
+export LIBEUFIN_SANDBOX_ADMIN_PASSWORD=foo
+libeufin-sandbox serve &> sandbox.log &
+SANDBOX_PID=$!
+echo DONE
+echo -n Wait for the bank...
+curl --max-time 2 --retry-connrefused --retry-delay 1 --retry 10 
http://localhost:5000/ &> /dev/null
+echo DONE
+echo -n Make one superuser at Nexus...
+export LIBEUFIN_NEXUS_DB_CONNECTION=jdbc:sqlite:$DB_PATH
+libeufin-nexus superuser test-user --password x
+echo DONE
+echo -n Launching Nexus...
+libeufin-nexus serve &> nexus.log &
+NEXUS_PID=$!
+echo DONE
+echo -n Waiting for Nexus...
+curl --max-time 2 --retry-connrefused --retry-delay 1 --retry 10 
http://localhost:5001/ &> /dev/null
+echo DONE
+
+echo -n "Register the 'www' Sandbox account..."
+export LIBEUFIN_SANDBOX_USERNAME=www
+export LIBEUFIN_SANDBOX_PASSWORD=foo
+libeufin-cli \
+  sandbox --sandbox-url http://localhost:5000/ \
+  demobank \
+  register
+echo DONE
+export LIBEUFIN_SANDBOX_USERNAME=admin
+export LIBEUFIN_SANDBOX_PASSWORD=foo
+echo -n "Create EBICS host at Sandbox..."
+libeufin-cli sandbox \
+  --sandbox-url http://localhost:5000 \
+  ebicshost create --host-id wwwebics
+echo OK
+echo -n "Create 'www' EBICS subscriber at Sandbox..."
+libeufin-cli sandbox \
+  --sandbox-url http://localhost:5000 \
+  demobank new-ebicssubscriber --host-id wwwebics \
+  --user-id wwwebics --partner-id wwwpartner \
+  --bank-account www # that's a username _and_ a bank account name
+echo OK
+export LIBEUFIN_NEXUS_USERNAME=test-user
+export LIBEUFIN_NEXUS_PASSWORD=x
+export LIBEUFIN_NEXUS_URL=http://localhost:5001
+echo -n Creating the EBICS connection at Nexus...
+libeufin-cli connections new-ebics-connection \
+  --ebics-url "http://localhost:5000/ebicsweb"; \
+  --host-id wwwebics \
+  --partner-id wwwpartner \
+  --ebics-user-id wwwebics \
+  wwwconn
+echo DONE
+echo -n Setup EBICS keying...
+libeufin-cli connections connect wwwconn > /dev/null
+echo OK
+echo -n Download bank account name from Sandbox...
+libeufin-cli connections download-bank-accounts wwwconn
+echo OK
+echo -n Importing bank account info into Nexus...
+libeufin-cli connections import-bank-account \
+  --offered-account-id www \
+  --nexus-bank-account-id www-nexus \
+  wwwconn
+echo OK
+echo -n Create the Taler facade at Nexus...
+libeufin-cli facades \
+  new-taler-wire-gateway-facade \
+  --currency TESTKUDOS --facade-name test-facade \
+  wwwconn www-nexus
+echo OK
+read -p "Press Enter to terminate..."

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]