add DB idempotency test
This commit is contained in:
parent
2ea3ae1008
commit
f8fd492e9e
@ -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' - >$@
|
gcc -E -P -undef - < exchange-0004.sql.in 2>/dev/null | sed -e "s/--.*//" | awk 'NF' - >$@
|
||||||
chmod ugo-w $@
|
chmod ugo-w $@
|
||||||
|
|
||||||
|
check_SCRIPTS = \
|
||||||
|
test_idempotency.sh
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
exchangedb.conf \
|
exchangedb.conf \
|
||||||
exchangedb-postgres.conf \
|
exchangedb-postgres.conf \
|
||||||
@ -72,6 +75,7 @@ EXTRA_DIST = \
|
|||||||
test-exchange-db-postgres.conf \
|
test-exchange-db-postgres.conf \
|
||||||
$(sqlinputs) \
|
$(sqlinputs) \
|
||||||
$(sql_DATA) \
|
$(sql_DATA) \
|
||||||
|
$(check_SCRIPTS) \
|
||||||
pg_template.h pg_template.c \
|
pg_template.h pg_template.c \
|
||||||
pg_template.sh
|
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;
|
AM_TESTS_ENVIRONMENT=export TALER_PREFIX=$${TALER_PREFIX:-@libdir@};export PATH=$${TALER_PREFIX:-@prefix@}/bin:$$PATH;
|
||||||
TESTS = \
|
TESTS = \
|
||||||
|
$(check_SCRIPTS) \
|
||||||
$(check_PROGRAMS)
|
$(check_PROGRAMS)
|
||||||
|
|
||||||
test_exchangedb_postgres_SOURCES = \
|
test_exchangedb_postgres_SOURCES = \
|
||||||
|
10
src/exchangedb/test_idempotency.sh
Executable file
10
src/exchangedb/test_idempotency.sh
Executable file
@ -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
|
Loading…
Reference in New Issue
Block a user