diff options
author | Léo Gaspard <leo@gaspard.io> | 2021-01-05 04:05:38 +0100 |
---|---|---|
committer | Léo Gaspard <leo@gaspard.io> | 2021-01-05 04:05:38 +0100 |
commit | fe8ec6a07ff1597495204bdcc979b39b5aac3e5e (patch) | |
tree | 07ebba2d63a46cee922ff10fae0da190a9cce3d0 /nixos | |
parent | 2833d869d7f0ae38d026db9d6350c3b4a151bae3 (diff) |
nixos tests: fix postgresql-wal-receiver.nix's eval
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/tests/postgresql-wal-receiver.nix | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/nixos/tests/postgresql-wal-receiver.nix b/nixos/tests/postgresql-wal-receiver.nix index 432b46234f9c..905f4b22e97b 100644 --- a/nixos/tests/postgresql-wal-receiver.nix +++ b/nixos/tests/postgresql-wal-receiver.nix @@ -1,10 +1,17 @@ +{ system ? builtins.currentSystem, + config ? {}, + pkgs ? import ../.. { inherit system config; } +}: + +with import ../lib/testing-python.nix { inherit system pkgs; }; + let # Makes a test for a PostgreSQL package, given by name and looked up from `pkgs`. makePostgresqlWalReceiverTest = postgresqlPackage: { name = postgresqlPackage; value = - import ./make-test-python.nix ({ pkgs, lib, ... }: let + let pkg = pkgs."${postgresqlPackage}"; postgresqlDataDir = "/var/lib/postgresql/${pkg.psqlSchema}"; @@ -19,7 +26,7 @@ let then pkgs.writeTextDir "recovery.signal" "" else pkgs.writeTextDir "recovery.conf" "restore_command = 'cp ${walBackupDir}/%f %p'"; - in { + in makeTest { name = "postgresql-wal-receiver-${postgresqlPackage}"; meta.maintainers = with lib.maintainers; [ pacien ]; @@ -104,7 +111,7 @@ let "test $(sudo -u postgres psql --pset='pager=off' --tuples-only --command='select count(distinct val) from dummy;') -eq 100" ) ''; - }); + }; }; # Maps the generic function over all attributes of PostgreSQL packages |