[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] branch master updated: add DB idempotency test
From: |
gnunet |
Subject: |
[taler-exchange] branch master updated: add DB idempotency test |
Date: |
Sat, 03 Jun 2023 12:54:15 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
The following commit(s) were added to refs/heads/master by this push:
new f8fd492e add DB idempotency test
f8fd492e is described below
commit f8fd492e9eb226776a06c5e32673e1b1037c1918
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sat Jun 3 12:53:41 2023 +0200
add DB idempotency test
---
src/exchangedb/Makefile.am | 5 +++++
src/exchangedb/test_idempotency.sh | 10 ++++++++++
2 files changed, 15 insertions(+)
diff --git a/src/exchangedb/Makefile.am b/src/exchangedb/Makefile.am
index 4df9cb40..c2e87e5d 100644
--- a/src/exchangedb/Makefile.am
+++ b/src/exchangedb/Makefile.am
@@ -65,6 +65,9 @@ exchange-0004.sql: exchange-0004.sql.in 0004-*.sql
gcc -E -P -undef - < exchange-0004.sql.in 2>/dev/null | sed -e
"s/--.*//" | awk 'NF' - >$@
chmod ugo-w $@
+check_SCRIPTS = \
+ test_idempotency.sh
+
EXTRA_DIST = \
exchangedb.conf \
exchangedb-postgres.conf \
@@ -72,6 +75,7 @@ EXTRA_DIST = \
test-exchange-db-postgres.conf \
$(sqlinputs) \
$(sql_DATA) \
+ $(check_SCRIPTS) \
pg_template.h pg_template.c \
pg_template.sh
@@ -311,6 +315,7 @@ noinst_PROGRAMS = \
AM_TESTS_ENVIRONMENT=export TALER_PREFIX=$${TALER_PREFIX:-@libdir@};export
PATH=$${TALER_PREFIX:-@prefix@}/bin:$$PATH;
TESTS = \
+ $(check_SCRIPTS) \
$(check_PROGRAMS)
test_exchangedb_postgres_SOURCES = \
diff --git a/src/exchangedb/test_idempotency.sh
b/src/exchangedb/test_idempotency.sh
new file mode 100755
index 00000000..1f42e67a
--- /dev/null
+++ b/src/exchangedb/test_idempotency.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+# This file is in the public domain.
+set -eu
+echo "Initializing DB"
+taler-exchange-dbinit -r test-exchange-db-postgres.conf
+echo "Re-initializing DB"
+taler-exchange-dbinit test-exchange-db-postgres.conf
+echo "Re-loading procedures"
+psql talercheck < procedures.sql
+exit 0
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-exchange] branch master updated: add DB idempotency test,
gnunet <=