gnu: guix-data-service: Enable build time tests.

Previously the tests were not run, as PostgreSQL wasn't running at build
time. Now there's a new target, check-with-tmp-database that uses ephemeralpg
to run the tests without relying on an externally managed PostgreSQL service.

* gnu/packages/web.scm (guix-data-service)[arguments]: Remove #:tests? #f, and
set #:test-target to "check-with-tmp-database".
[native-inputs]: Add ephemeralpg.
This commit is contained in:
Christopher Baines 2019-10-21 18:32:11 +01:00
parent a379ddaff4
commit 353f5f7aa7
No known key found for this signature in database
GPG key ID: 5E28A33B0B84F577

View file

@ -4044,11 +4044,11 @@ (define-public guix-data-service
"0awfvps7k9bpg3gpgc93y401g7pjabx7mr9960vigad8vddhixqi")))) "0awfvps7k9bpg3gpgc93y401g7pjabx7mr9960vigad8vddhixqi"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
'(#:tests? #f ; TODO Tests require PostgreSQL '(#:modules ((guix build utils)
#:modules ((guix build utils)
(guix build gnu-build-system) (guix build gnu-build-system)
(ice-9 rdelim) (ice-9 rdelim)
(ice-9 popen)) (ice-9 popen))
#:test-target "check-with-tmp-database"
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(add-after 'set-paths 'set-GUIX_ENVIRONMENT (add-after 'set-paths 'set-GUIX_ENVIRONMENT
@ -4106,6 +4106,7 @@ (define-public guix-data-service
`(("guile" ,guile-2.2) `(("guile" ,guile-2.2)
("autoconf" ,autoconf) ("autoconf" ,autoconf)
("automake" ,automake) ("automake" ,automake)
("ephemeralpg" ,ephemeralpg)
("emacs-with-modules" ,(directory-union ("emacs-with-modules" ,(directory-union
"emacs-union" "emacs-union"
(list emacs-no-x (list emacs-no-x