gnunet-svn
[Top][All Lists]
Advanced

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

[taler-merchant] 09/14: start test


From: gnunet
Subject: [taler-merchant] 09/14: start test
Date: Sun, 08 Dec 2024 14:18:18 +0100

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

grothoff pushed a commit to branch master
in repository merchant.

commit 29663c0c88a3b6b3a3cf2587393d1e3c713f4236
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Wed Dec 4 12:00:39 2024 +0100

    start test
---
 src/backenddb/Makefile.am             | 9 +++++++--
 src/backenddb/test_webhook_trigger.sh | 9 +++++++++
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/src/backenddb/Makefile.am b/src/backenddb/Makefile.am
index bc07c936..b5a8d1fe 100644
--- a/src/backenddb/Makefile.am
+++ b/src/backenddb/Makefile.am
@@ -231,15 +231,20 @@ test_merchantdb_postgres_LDFLAGS = \
   -ljansson \
   $(XLIB)
 
+check_SCRIPTS = \
+  test_webhook_trigger.sh
+
 test_merchantdb_postgres_LDADD = \
   $(top_builddir)/src/util/libtalermerchantutil.la \
   $(top_builddir)/src/backenddb/libtalermerchantdb.la
 
 TESTS = \
-  test-merchantdb-postgres
+  $(check_PROGRAMS) \
+  $(check_SCRIPTS)
 
 EXTRA_DIST = \
   test-merchantdb-postgres.conf \
   merchantdb-postgres.conf \
   $(sqlinputs) \
-  $(sql_DATA)
+  $(sql_DATA) \
+  $(check_SCRIPTS)
diff --git a/src/backenddb/test_webhook_trigger.sh 
b/src/backenddb/test_webhook_trigger.sh
new file mode 100644
index 00000000..a11ae9e1
--- /dev/null
+++ b/src/backenddb/test_webhook_trigger.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+set -eu
+taler-merchant-dbinit -r -c test-merchantdb-postgres.conf
+echo "INSERT INTO foo VALUES (bar);" | psql talercheck
+echo "UPDATE exchange.reserves_in SET credit.val=5 WHERE 
reserve_in_serial_id=1" \
+    | psql -At "$DB"
+SERIALE=$(echo "SELECT coin_deposit_serial_id FROM exchange.coin_deposits 
WHERE (amount_with_fee).val=3 ORDER BY coin_deposit_serial_id LIMIT 1;" | psql 
"$DB" -Aqt)
+OLD_COIN_SIG=$(echo "SELECT coin_sig FROM exchange.coin_deposits WHERE 
coin_deposit_serial_id=${SERIALE};"  | psql "$DB" -Aqt)

-- 
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]