Don't automatically shutdown the test database
As this leaves a process running, it's better just to stop the database manually.
This commit is contained in:
parent
06af9ce6de
commit
c9c7666b49
1 changed files with 3 additions and 1 deletions
|
|
@ -51,7 +51,9 @@ install-data-hook:
|
||||||
|
|
||||||
check-with-tmp-database:
|
check-with-tmp-database:
|
||||||
$(eval TMP_DATABASE := $(shell mktemp -d -t guix-data-service-database-XXXX))
|
$(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)))
|
$(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 USER guix_data_service"
|
||||||
psql --no-psqlrc "$(URI)" --command="CREATE DATABASE guix_data_service_test WITH OWNER guix_data_service"
|
psql --no-psqlrc "$(URI)" --command="CREATE DATABASE guix_data_service_test WITH OWNER guix_data_service"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue