Skip to content

Commit

Permalink
nixosTests.postgresql.*: fix eval
Browse files Browse the repository at this point in the history
The `libpq` attribute from `postgresqlVersions` doesn't have a `pkgs`
attribute with extensions in it. Filtering for postgresql server
packages only fixes the problem.

Reported in NixOS#359659 (comment)
  • Loading branch information
Ma27 committed Jan 20, 2025
1 parent 5ff3902 commit 7ab1e88
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion nixos/tests/postgresql/anonymizer.nix
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ let
in
lib.recurseIntoAttrs (
lib.concatMapAttrs (n: p: { ${n} = makeTestFor p; }) (
lib.filterAttrs (_: p: !p.pkgs.anonymizer.meta.broken) pkgs.postgresqlVersions
lib.filterAttrs (_: p: p ? pkgs && !p.pkgs.anonymizer.meta.broken) pkgs.postgresqlVersions
)
// {
passthru.override = p: makeTestFor p;
Expand Down
2 changes: 1 addition & 1 deletion nixos/tests/postgresql/pgjwt.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ let
in
lib.recurseIntoAttrs (
lib.concatMapAttrs (n: p: { ${n} = makeTestFor p; }) (
lib.filterAttrs (_: p: !p.pkgs.pgjwt.meta.broken) pkgs.postgresqlVersions
lib.filterAttrs (_: p: p ? pkgs && !p.pkgs.pgjwt.meta.broken) pkgs.postgresqlVersions
)
// {
passthru.override = p: makeTestFor p;
Expand Down
2 changes: 1 addition & 1 deletion nixos/tests/postgresql/pgvecto-rs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ let
in
lib.recurseIntoAttrs (
lib.concatMapAttrs (n: p: { ${n} = makeTestFor p; }) (
lib.filterAttrs (_: p: !p.pkgs.pgvecto-rs.meta.broken) pkgs.postgresqlVersions
lib.filterAttrs (_: p: p ? pkgs && !p.pkgs.pgvecto-rs.meta.broken) pkgs.postgresqlVersions
)
// {
passthru.override = p: makeTestFor p;
Expand Down
4 changes: 3 additions & 1 deletion nixos/tests/postgresql/postgresql-tls-client-cert.nix
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@ let
};
in
lib.recurseIntoAttrs (
lib.concatMapAttrs (n: p: { ${n} = makeTestFor p; }) pkgs.postgresqlVersions
lib.concatMapAttrs (n: p: { ${n} = makeTestFor p; }) (
lib.filterAttrs (_: p: p ? pkgs) pkgs.postgresqlVersions
)
// {
passthru.override = p: makeTestFor p;
}
Expand Down
4 changes: 3 additions & 1 deletion nixos/tests/postgresql/postgresql-wal-receiver.nix
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ let
};
in
lib.recurseIntoAttrs (
lib.concatMapAttrs (n: p: { ${n} = makeTestFor p; }) pkgs.postgresqlVersions
lib.concatMapAttrs (n: p: { ${n} = makeTestFor p; }) (
lib.filterAttrs (_: p: p ? pkgs) pkgs.postgresqlVersions
)
// {
passthru.override = p: makeTestFor p;
}
Expand Down
4 changes: 3 additions & 1 deletion nixos/tests/postgresql/postgresql.nix
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,9 @@ let
};
in
lib.recurseIntoAttrs (
lib.concatMapAttrs (n: p: { ${n} = makeTestFor p; }) pkgs.postgresqlVersions
lib.concatMapAttrs (n: p: { ${n} = makeTestFor p; }) (
lib.filterAttrs (_: p: p ? pkgs) pkgs.postgresqlVersions
)
// {
passthru.override = p: makeTestFor p;
}
Expand Down
2 changes: 1 addition & 1 deletion nixos/tests/postgresql/timescaledb.nix
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ in
# NIXPKGS_ALLOW_UNFREE=1 nix-build -A nixosTests.postgresql.timescaledb
lib.dontRecurseIntoAttrs (
lib.concatMapAttrs (n: p: { ${n} = makeTestFor p; }) (
lib.filterAttrs (_: p: !p.pkgs.timescaledb.meta.broken) pkgs.postgresqlVersions
lib.filterAttrs (_: p: p ? pkgs && !p.pkgs.timescaledb.meta.broken) pkgs.postgresqlVersions
)
// {
passthru.override = p: makeTestFor p;
Expand Down
2 changes: 1 addition & 1 deletion nixos/tests/postgresql/tsja.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ let
in
lib.recurseIntoAttrs (
lib.concatMapAttrs (n: p: { ${n} = makeTestFor p; }) (
lib.filterAttrs (_: p: !p.pkgs.tsja.meta.broken) pkgs.postgresqlVersions
lib.filterAttrs (_: p: p ? pkgs && !p.pkgs.tsja.meta.broken) pkgs.postgresqlVersions
)
// {
passthru.override = p: makeTestFor p;
Expand Down
2 changes: 1 addition & 1 deletion nixos/tests/postgresql/wal2json.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ let
in
lib.recurseIntoAttrs (
lib.concatMapAttrs (n: p: { ${n} = makeTestFor p; }) (
lib.filterAttrs (_: p: !p.pkgs.wal2json.meta.broken) pkgs.postgresqlVersions
lib.filterAttrs (_: p: p ? pkgs && !p.pkgs.wal2json.meta.broken) pkgs.postgresqlVersions
)
// {
passthru.override = p: makeTestFor p;
Expand Down

0 comments on commit 7ab1e88

Please sign in to comment.