postgresql: add passthru.tests.postgresql-tls-client-cert

Same reasoning as commit before.
This commit is contained in:
Wolfgang Walther 2024-11-01 19:29:41 +01:00
parent f6c2de9262
commit 139c546676
No known key found for this signature in database
GPG Key ID: B39893FA5F65CAE1
2 changed files with 5 additions and 14 deletions

View File

@ -1,7 +1,6 @@
{ system ? builtins.currentSystem
, config ? { }
, pkgs ? import ../.. { inherit system config; }
, package ? null
}:
with import ../lib/testing-python.nix { inherit system pkgs; };
@ -9,13 +8,6 @@ with import ../lib/testing-python.nix { inherit system pkgs; };
let
lib = pkgs.lib;
# Makes a test for a PostgreSQL package, given by name and looked up from `pkgs`.
makeTestAttribute = name:
{
inherit name;
value = makePostgresqlTlsClientCertTest pkgs."${name}";
};
makePostgresqlTlsClientCertTest = pkg:
let
runWithOpenSSL = file: cmd: pkgs.runCommand file
@ -133,9 +125,7 @@ let
};
in
if package == null then
# all-tests.nix: Maps the generic function over all attributes of PostgreSQL packages
builtins.listToAttrs (map makeTestAttribute (builtins.attrNames (import ../../pkgs/servers/sql/postgresql pkgs)))
else
# Called directly from <package>.tests
makePostgresqlTlsClientCertTest package
lib.concatMapAttrs (n: p: { ${n} = makePostgresqlTlsClientCertTest p; }) pkgs.postgresqlVersions
// {
passthru.override = p: makePostgresqlTlsClientCertTest p;
}

View File

@ -313,6 +313,7 @@ let
tests = {
postgresql = nixosTests.postgresql.passthru.override finalAttrs.finalPackage;
postgresql-tls-client-cert = nixosTests.postgresql-tls-client-cert.passthru.override finalAttrs.finalPackage;
postgresql-wal-receiver = nixosTests.postgresql-wal-receiver.passthru.override finalAttrs.finalPackage;
pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
} // lib.optionalAttrs jitSupport {