summaryrefslogtreecommitdiffstats
path: root/nixos/tests/postgresql/default.nix
blob: a5d363a709eeba139238ef02dbe18922c84eafd8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{
  runTest,
  pkgs,
}:

let
  inherit (pkgs.lib)
    recurseIntoAttrs
    filterAttrs
    mapAttrs
    const
    ;
  genTests =
    {
      makeTestFor,
      filter ? (_: _: true),
    }:
    recurseIntoAttrs (
      mapAttrs (const makeTestFor) (filterAttrs filter pkgs.postgresqlVersions)
      // {
        passthru.override = makeTestFor;
      }
    );

  importWithArgs =
    path:
    import path {
      inherit runTest genTests;
      inherit (pkgs) lib;
    };
in
{
  # postgresql
  postgresql = importWithArgs ./postgresql.nix;
  postgresql-jit = importWithArgs ./postgresql-jit.nix;
  postgresql-replication = importWithArgs ./postgresql-replication.nix;
  postgresql-wal-receiver = importWithArgs ./postgresql-wal-receiver.nix;
  postgresql-tls-client-cert = importWithArgs ./postgresql-tls-client-cert.nix;

  # extensions
  anonymizer = importWithArgs ./anonymizer.nix;
  pgjwt = importWithArgs ./pgjwt.nix;
  wal2json = importWithArgs ./wal2json.nix;
}