diff options
| author | Nguyễn Gia Phong <cnx@loang.net> | 2026-04-06 23:14:40 +0900 |
|---|---|---|
| committer | Nguyễn Gia Phong <cnx@loang.net> | 2026-04-07 23:23:33 +0900 |
| commit | 9d4a2622a8db146464aa0cddb28514a61b73cb0d (patch) | |
| tree | a56525a75906aa9a6760c8dbc0c925efad3950f5 /gnu/tests | |
| parent | aad3d181036e92e898d8caee6a51613bc2aa2b63 (diff) | |
tests: timescaledb: Fix postgresql package in profile.
* gnu/tests/databases.scm (%timescaledb-os)[services]<postgresql>:
Use the postgresql package from timescaledb's inputs.
(run-timescaledb-test): Use the psql binary installed in the profile.
Change-Id: Ib9a0efd3534f2f0731e3d58ac4f8f59301fc8592
Diffstat (limited to 'gnu/tests')
| -rw-r--r-- | gnu/tests/databases.scm | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gnu/tests/databases.scm b/gnu/tests/databases.scm index 756280a327b..b2651e9f666 100644 --- a/gnu/tests/databases.scm +++ b/gnu/tests/databases.scm | |||
| @@ -29,6 +29,7 @@ | |||
| 29 | #:use-module (gnu services networking) | 29 | #:use-module (gnu services networking) |
| 30 | #:use-module (gnu packages databases) | 30 | #:use-module (gnu packages databases) |
| 31 | #:use-module (guix gexp) | 31 | #:use-module (guix gexp) |
| 32 | #:use-module (guix packages) | ||
| 32 | #:use-module (guix store) | 33 | #:use-module (guix store) |
| 33 | #:use-module (srfi srfi-1) | 34 | #:use-module (srfi srfi-1) |
| 34 | #:export (%test-memcached | 35 | #:export (%test-memcached |
| @@ -312,6 +313,8 @@ | |||
| 312 | (service postgresql-service-type | 313 | (service postgresql-service-type |
| 313 | (postgresql-configuration | 314 | (postgresql-configuration |
| 314 | (inherit postgresql-service-configuration) | 315 | (inherit postgresql-service-configuration) |
| 316 | (postgresql (car (assoc-ref (package-inputs timescaledb) | ||
| 317 | "postgresql"))) | ||
| 315 | (extension-packages (list timescaledb)) | 318 | (extension-packages (list timescaledb)) |
| 316 | (config-file | 319 | (config-file |
| 317 | (postgresql-config-file | 320 | (postgresql-config-file |
| @@ -381,8 +384,7 @@ | |||
| 381 | (use-modules (guix build utils)) | 384 | (use-modules (guix build utils)) |
| 382 | 385 | ||
| 383 | (current-output-port (open-file "/dev/console" "w0")) | 386 | (current-output-port (open-file "/dev/console" "w0")) |
| 384 | (invoke #$(file-append postgresql "/bin/psql") | 387 | (invoke "psql" "-tA" "-c" "CREATE DATABASE test")) |
| 385 | "-tA" "-c" "CREATE DATABASE test")) | ||
| 386 | marionette)) | 388 | marionette)) |
| 387 | 389 | ||
| 388 | (test-assert "load extension" | 390 | (test-assert "load extension" |
| @@ -391,7 +393,7 @@ | |||
| 391 | (current-output-port (open-file "/dev/console" "w0")) | 393 | (current-output-port (open-file "/dev/console" "w0")) |
| 392 | ;; Capture stderr for the next test. | 394 | ;; Capture stderr for the next test. |
| 393 | (current-error-port (open-file "timescaledb.stderr" "w0")) | 395 | (current-error-port (open-file "timescaledb.stderr" "w0")) |
| 394 | (invoke #$(file-append postgresql "/bin/psql") | 396 | (invoke "psql" |
| 395 | "-tA" "-c" "CREATE EXTENSION timescaledb" | 397 | "-tA" "-c" "CREATE EXTENSION timescaledb" |
| 396 | "test")) | 398 | "test")) |
| 397 | marionette)) | 399 | marionette)) |
| @@ -408,13 +410,13 @@ | |||
| 408 | (marionette-eval | 410 | (marionette-eval |
| 409 | '(begin | 411 | '(begin |
| 410 | (current-output-port (open-file "/dev/console" "w0")) | 412 | (current-output-port (open-file "/dev/console" "w0")) |
| 411 | (invoke #$(file-append postgresql "/bin/psql") | 413 | (invoke "psql" |
| 412 | "-tA" "-c" "CREATE TABLE ht ( | 414 | "-tA" "-c" "CREATE TABLE ht ( |
| 413 | time TIMESTAMP NOT NULL, | 415 | time TIMESTAMP NOT NULL, |
| 414 | data double PRECISION NULL | 416 | data double PRECISION NULL |
| 415 | )" | 417 | )" |
| 416 | "test") | 418 | "test") |
| 417 | (invoke #$(file-append postgresql "/bin/psql") | 419 | (invoke "psql" |
| 418 | "-tA" "-c" "SELECT create_hypertable('ht','time')" | 420 | "-tA" "-c" "SELECT create_hypertable('ht','time')" |
| 419 | "test")) | 421 | "test")) |
| 420 | marionette)) | 422 | marionette)) |
