From c9c7666b4987b73912cbbdaa9fdaa2a813e9646d Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Fri, 11 Oct 2019 08:43:21 +0100 Subject: Don't automatically shutdown the test database As this leaves a process running, it's better just to stop the database manually. --- Makefile.am | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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" -- cgit v1.2.3