mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-22 12:53:54 +00:00
postgresql: add passthru.tests.postgresql-tls-client-cert
Same reasoning as commit before.
This commit is contained in:
parent
f6c2de9262
commit
139c546676
@ -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;
|
||||
}
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user