aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-10-11 08:43:21 +0100
committerChristopher Baines <mail@cbaines.net>2019-10-11 08:43:21 +0100
commitc9c7666b4987b73912cbbdaa9fdaa2a813e9646d (patch)
tree5956d36fa26eb9d37dbf19234a5680b91f141f55
parent06af9ce6de2aa4748a81ac3f7a478282000d4b63 (diff)
downloaddata-service-c9c7666b4987b73912cbbdaa9fdaa2a813e9646d.tar
data-service-c9c7666b4987b73912cbbdaa9fdaa2a813e9646d.tar.gz
Don't automatically shutdown the test database
As this leaves a process running, it's better just to stop the database manually.
-rw-r--r--Makefile.am4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 3425b6d..baa8ef7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -51,7 +51,9 @@ install-data-hook:
check-with-tmp-database:
$(eval TMP_DATABASE := $(shell mktemp -d -t guix-data-service-database-XXXX))
- $(eval URI := $(shell pg_tmp -d "$(TMP_DATABASE)"))
+# -w 0 means that the database won't be automatically shutdown, and needs to
+# -be stopped by running pg_tmp stop
+ $(eval URI := $(shell pg_tmp -w 0 -d "$(TMP_DATABASE)"))
$(eval GUIX_DATA_SERVICE_DATABASE_URI := $(patsubst postgresql:///test%,postgresql://guix_data_service@localhost/guix_data_service_test%,$(URI)))
psql --no-psqlrc "$(URI)" --command="CREATE USER guix_data_service"
psql --no-psqlrc "$(URI)" --command="CREATE DATABASE guix_data_service_test WITH OWNER guix_data_service"