From 9035573855d9d1bd3c0e7512d361b9d95e47c033 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sat, 2 Nov 2024 18:58:52 +0100 Subject: [PATCH] nixosTests.postgresql: move all postgresql related nixosTests into one folder This makes it possible to run all those tests at once by building nixosTests.postgresql and allow a simple entry to ci/OWNERS for all tests. --- ci/OWNERS | 2 +- nixos/tests/all-tests.nix | 11 +--- nixos/tests/postgresql-wal2json.nix | 52 ------------------- .../anonymizer.nix} | 19 ++++--- nixos/tests/postgresql/default.nix | 26 ++++++++++ nixos/tests/{ => postgresql}/pgjwt.nix | 17 +++--- nixos/tests/{ => postgresql}/pgvecto-rs.nix | 16 +++--- .../tests/{ => postgresql}/postgresql-jit.nix | 17 +++--- .../postgresql-tls-client-cert.nix | 17 +++--- .../postgresql-wal-receiver.nix | 17 +++--- nixos/tests/{ => postgresql}/postgresql.nix | 16 +++--- nixos/tests/{ => postgresql}/timescaledb.nix | 19 ++++--- nixos/tests/{ => postgresql}/tsja.nix | 17 +++--- nixos/tests/postgresql/wal2json.nix | 50 ++++++++++++++++++ pkgs/by-name/pg/pg-dump-anon/package.nix | 2 +- .../servers/sql/postgresql/ext/anonymizer.nix | 2 +- pkgs/servers/sql/postgresql/ext/pgjwt.nix | 2 +- .../sql/postgresql/ext/pgvecto-rs/default.nix | 2 +- .../sql/postgresql/ext/timescaledb.nix | 2 +- .../postgresql/ext/timescaledb_toolkit.nix | 2 +- pkgs/servers/sql/postgresql/ext/tsja.nix | 2 +- pkgs/servers/sql/postgresql/ext/wal2json.nix | 2 +- pkgs/servers/sql/postgresql/generic.nix | 8 +-- 23 files changed, 166 insertions(+), 154 deletions(-) delete mode 100644 nixos/tests/postgresql-wal2json.nix rename nixos/tests/{pg_anonymizer.nix => postgresql/anonymizer.nix} (91%) create mode 100644 nixos/tests/postgresql/default.nix rename nixos/tests/{ => postgresql}/pgjwt.nix (76%) rename nixos/tests/{ => postgresql}/pgvecto-rs.nix (85%) rename nixos/tests/{ => postgresql}/postgresql-jit.nix (78%) rename nixos/tests/{ => postgresql}/postgresql-tls-client-cert.nix (92%) rename nixos/tests/{ => postgresql}/postgresql-wal-receiver.nix (92%) rename nixos/tests/{ => postgresql}/postgresql.nix (96%) rename nixos/tests/{ => postgresql}/timescaledb.nix (83%) rename nixos/tests/{ => postgresql}/tsja.nix (77%) create mode 100644 nixos/tests/postgresql/wal2json.nix diff --git a/ci/OWNERS b/ci/OWNERS index 8e227b152566..b8aa53105fc9 100644 --- a/ci/OWNERS +++ b/ci/OWNERS @@ -229,7 +229,7 @@ pkgs/development/python-modules/buildcatrust/ @ajs124 @lukegb @mweinelt /pkgs/servers/sql/postgresql @NixOS/postgres /nixos/modules/services/databases/postgresql.md @NixOS/postgres /nixos/modules/services/databases/postgresql.nix @NixOS/postgres -/nixos/tests/postgresql.nix @NixOS/postgres +/nixos/tests/postgresql @NixOS/postgres # Hardened profile & related modules /nixos/modules/profiles/hardened.nix @joachifm diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index bb674910e700..37e005f128a2 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -775,13 +775,10 @@ in { peering-manager = handleTest ./web-apps/peering-manager.nix {}; peertube = handleTestOn ["x86_64-linux"] ./web-apps/peertube.nix {}; peroxide = handleTest ./peroxide.nix {}; - pg_anonymizer = handleTest ./pg_anonymizer.nix {}; pgadmin4 = handleTest ./pgadmin4.nix {}; pgbouncer = handleTest ./pgbouncer.nix {}; pghero = runTest ./pghero.nix; - pgjwt = handleTest ./pgjwt.nix {}; pgmanage = handleTest ./pgmanage.nix {}; - pgvecto-rs = handleTest ./pgvecto-rs.nix {}; phosh = handleTest ./phosh.nix {}; photonvision = handleTest ./photonvision.nix {}; photoprism = handleTest ./photoprism.nix {}; @@ -814,11 +811,7 @@ in { postfix = handleTest ./postfix.nix {}; postfix-raise-smtpd-tls-security-level = handleTest ./postfix-raise-smtpd-tls-security-level.nix {}; postfixadmin = handleTest ./postfixadmin.nix {}; - postgresql = handleTest ./postgresql.nix {}; - postgresql-jit = handleTest ./postgresql-jit.nix {}; - postgresql-wal-receiver = handleTest ./postgresql-wal-receiver.nix {}; - postgresql-tls-client-cert = handleTest ./postgresql-tls-client-cert.nix {}; - postgresql-wal2json = handleTest ./postgresql-wal2json.nix {}; + postgresql = handleTest ./postgresql {}; powerdns = handleTest ./powerdns.nix {}; powerdns-admin = handleTest ./powerdns-admin.nix {}; power-profiles-daemon = handleTest ./power-profiles-daemon.nix {}; @@ -1045,7 +1038,6 @@ in { tiddlywiki = handleTest ./tiddlywiki.nix {}; tigervnc = handleTest ./tigervnc.nix {}; tika = runTest ./tika.nix; - timescaledb = handleTest ./timescaledb.nix {}; timezone = handleTest ./timezone.nix {}; timidity = handleTestOn ["aarch64-linux" "x86_64-linux"] ./timidity {}; tinc = handleTest ./tinc {}; @@ -1065,7 +1057,6 @@ in { trezord = handleTest ./trezord.nix {}; trickster = handleTest ./trickster.nix {}; trilium-server = handleTestOn ["x86_64-linux"] ./trilium-server.nix {}; - tsja = handleTest ./tsja.nix {}; tsm-client-gui = handleTest ./tsm-client-gui.nix {}; ttyd = handleTest ./web-servers/ttyd.nix {}; txredisapi = handleTest ./txredisapi.nix {}; diff --git a/nixos/tests/postgresql-wal2json.nix b/nixos/tests/postgresql-wal2json.nix deleted file mode 100644 index 2ad1a1ee66a0..000000000000 --- a/nixos/tests/postgresql-wal2json.nix +++ /dev/null @@ -1,52 +0,0 @@ -{ - system ? builtins.currentSystem, - config ? { }, - pkgs ? import ../.. { inherit system config; }, -}: - -with import ../lib/testing-python.nix { inherit system pkgs; }; - -let - inherit (pkgs) lib; - - makePostgresqlWal2jsonTest = - postgresqlPackage: - makeTest { - name = "postgresql-wal2json-${postgresqlPackage.name}"; - meta.maintainers = with pkgs.lib.maintainers; [ euank ]; - - nodes.machine = { - services.postgresql = { - package = postgresqlPackage; - enable = true; - extraPlugins = with postgresqlPackage.pkgs; [ wal2json ]; - settings = { - wal_level = "logical"; - max_replication_slots = "10"; - max_wal_senders = "10"; - }; - }; - }; - - testScript = '' - machine.wait_for_unit("postgresql") - machine.succeed( - "sudo -u postgres psql -qAt -f ${./postgresql/wal2json/example2.sql} postgres > /tmp/example2.out" - ) - machine.succeed( - "diff ${./postgresql/wal2json/example2.out} /tmp/example2.out" - ) - machine.succeed( - "sudo -u postgres psql -qAt -f ${./postgresql/wal2json/example3.sql} postgres > /tmp/example3.out" - ) - machine.succeed( - "diff ${./postgresql/wal2json/example3.out} /tmp/example3.out" - ) - ''; - }; - -in -lib.concatMapAttrs (n: p: { ${n} = makePostgresqlWal2jsonTest p; }) pkgs.postgresqlVersions -// { - passthru.override = p: makePostgresqlWal2jsonTest p; -} diff --git a/nixos/tests/pg_anonymizer.nix b/nixos/tests/postgresql/anonymizer.nix similarity index 91% rename from nixos/tests/pg_anonymizer.nix rename to nixos/tests/postgresql/anonymizer.nix index 080b8deabbe8..7b9d84ca8aff 100644 --- a/nixos/tests/pg_anonymizer.nix +++ b/nixos/tests/postgresql/anonymizer.nix @@ -1,16 +1,13 @@ -{ system ? builtins.currentSystem -, config ? {} -, pkgs ? import ../.. { inherit system config; } +{ pkgs +, makeTest }: -with import ../lib/testing-python.nix { inherit system pkgs; }; - let inherit (pkgs) lib; makeAnonymizerTest = postgresqlPackage: makeTest { - name = "pg_anonymizer-${postgresqlPackage.name}"; + name = "postgresql_anonymizer-${postgresqlPackage.name}"; meta.maintainers = lib.teams.flyingcircus.members; nodes.machine = { pkgs, ... }: { @@ -105,7 +102,9 @@ let ''; }; in -pkgs.lib.concatMapAttrs (n: p: { ${n} = makeAnonymizerTest p; }) pkgs.postgresqlVersions -// { - passthru.override = p: makeAnonymizerTest p; -} +pkgs.lib.recurseIntoAttrs ( + pkgs.lib.concatMapAttrs (n: p: { ${n} = makeAnonymizerTest p; }) pkgs.postgresqlVersions + // { + passthru.override = p: makeAnonymizerTest p; + } +) diff --git a/nixos/tests/postgresql/default.nix b/nixos/tests/postgresql/default.nix new file mode 100644 index 000000000000..4fe7e7a37e7e --- /dev/null +++ b/nixos/tests/postgresql/default.nix @@ -0,0 +1,26 @@ +{ + system ? builtins.currentSystem, + config ? { }, + pkgs ? import ../../.. { inherit system config; }, +}: + +with import ../../lib/testing-python.nix { inherit system pkgs; }; + +let + importWithArgs = path: import path { inherit pkgs makeTest; }; +in +{ + # postgresql + postgresql = importWithArgs ./postgresql.nix; + postgresql-jit = importWithArgs ./postgresql-jit.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; + pgvecto-rs = importWithArgs ./pgvecto-rs.nix; + timescaledb = importWithArgs ./timescaledb.nix; + tsja = importWithArgs ./tsja.nix; + wal2json = importWithArgs ./wal2json.nix; +} diff --git a/nixos/tests/pgjwt.nix b/nixos/tests/postgresql/pgjwt.nix similarity index 76% rename from nixos/tests/pgjwt.nix rename to nixos/tests/postgresql/pgjwt.nix index 5c14ee68b595..e8beb6cbee53 100644 --- a/nixos/tests/pgjwt.nix +++ b/nixos/tests/postgresql/pgjwt.nix @@ -1,10 +1,7 @@ -{ system ? builtins.currentSystem -, config ? {} -, pkgs ? import ../.. { inherit system config; } +{ pkgs +, makeTest }: -with import ../lib/testing-python.nix { inherit system pkgs; }; - let inherit (pkgs) lib; @@ -41,7 +38,9 @@ let ''; }; in -lib.concatMapAttrs (n: p: { ${n} = makePgjwtTest p; }) pkgs.postgresqlVersions -// { - passthru.override = p: makePgjwtTest p; -} +lib.recurseIntoAttrs ( + lib.concatMapAttrs (n: p: { ${n} = makePgjwtTest p; }) pkgs.postgresqlVersions + // { + passthru.override = p: makePgjwtTest p; + } +) diff --git a/nixos/tests/pgvecto-rs.nix b/nixos/tests/postgresql/pgvecto-rs.nix similarity index 85% rename from nixos/tests/pgvecto-rs.nix rename to nixos/tests/postgresql/pgvecto-rs.nix index 4a2b75132ed5..4d14dfdb6bb1 100644 --- a/nixos/tests/pgvecto-rs.nix +++ b/nixos/tests/postgresql/pgvecto-rs.nix @@ -1,9 +1,7 @@ -{ system ? builtins.currentSystem -, config ? { } -, pkgs ? import ../.. { inherit system config; } +{ pkgs +, makeTest }: -with import ../lib/testing-python.nix { inherit system pkgs; }; with pkgs.lib; let @@ -68,7 +66,9 @@ let }; in -concatMapAttrs (n: p: { ${n} = makePgVectorsTest p; }) (filterAttrs (n: p: !p.pkgs.pgvecto-rs.meta.broken) pkgs.postgresqlVersions) -// { - passthru.override = p: makePgVectorsTest p; -} +recurseIntoAttrs ( + concatMapAttrs (n: p: { ${n} = makePgVectorsTest p; }) (filterAttrs (n: p: !p.pkgs.pgvecto-rs.meta.broken) pkgs.postgresqlVersions) + // { + passthru.override = p: makePgVectorsTest p; + } +) diff --git a/nixos/tests/postgresql-jit.nix b/nixos/tests/postgresql/postgresql-jit.nix similarity index 78% rename from nixos/tests/postgresql-jit.nix rename to nixos/tests/postgresql/postgresql-jit.nix index fb598972ba0f..40329d038fef 100644 --- a/nixos/tests/postgresql-jit.nix +++ b/nixos/tests/postgresql/postgresql-jit.nix @@ -1,10 +1,7 @@ -{ system ? builtins.currentSystem -, config ? {} -, pkgs ? import ../.. { inherit system config; } +{ pkgs +, makeTest }: -with import ../lib/testing-python.nix { inherit system pkgs; }; - let inherit (pkgs) lib; @@ -44,7 +41,9 @@ let ''; }; in -lib.concatMapAttrs (n: p: { ${n} = mkJitTest p; }) (lib.filterAttrs (n: _: lib.hasSuffix "_jit" n) pkgs.postgresqlVersions) -// { - passthru.override = p: mkJitTest p; -} +lib.recurseIntoAttrs ( + lib.concatMapAttrs (n: p: { ${n} = mkJitTest p; }) (lib.filterAttrs (n: _: lib.hasSuffix "_jit" n) pkgs.postgresqlVersions) + // { + passthru.override = p: mkJitTest p; + } +) diff --git a/nixos/tests/postgresql-tls-client-cert.nix b/nixos/tests/postgresql/postgresql-tls-client-cert.nix similarity index 92% rename from nixos/tests/postgresql-tls-client-cert.nix rename to nixos/tests/postgresql/postgresql-tls-client-cert.nix index 86dada85f272..503bc77268c2 100644 --- a/nixos/tests/postgresql-tls-client-cert.nix +++ b/nixos/tests/postgresql/postgresql-tls-client-cert.nix @@ -1,10 +1,7 @@ -{ system ? builtins.currentSystem -, config ? { } -, pkgs ? import ../.. { inherit system config; } +{ pkgs +, makeTest }: -with import ../lib/testing-python.nix { inherit system pkgs; }; - let lib = pkgs.lib; @@ -125,7 +122,9 @@ let }; in -lib.concatMapAttrs (n: p: { ${n} = makePostgresqlTlsClientCertTest p; }) pkgs.postgresqlVersions -// { - passthru.override = p: makePostgresqlTlsClientCertTest p; -} +lib.recurseIntoAttrs ( + lib.concatMapAttrs (n: p: { ${n} = makePostgresqlTlsClientCertTest p; }) pkgs.postgresqlVersions + // { + passthru.override = p: makePostgresqlTlsClientCertTest p; + } +) diff --git a/nixos/tests/postgresql-wal-receiver.nix b/nixos/tests/postgresql/postgresql-wal-receiver.nix similarity index 92% rename from nixos/tests/postgresql-wal-receiver.nix rename to nixos/tests/postgresql/postgresql-wal-receiver.nix index 9b70668e7305..d46b3fcbdcf3 100644 --- a/nixos/tests/postgresql-wal-receiver.nix +++ b/nixos/tests/postgresql/postgresql-wal-receiver.nix @@ -1,10 +1,7 @@ -{ system ? builtins.currentSystem, - config ? {}, - pkgs ? import ../.. { inherit system config; }, +{ pkgs +, makeTest }: -with import ../lib/testing-python.nix { inherit system pkgs; }; - let lib = pkgs.lib; @@ -107,7 +104,9 @@ let ''; }; in -lib.concatMapAttrs (n: p: { ${n} = makePostgresqlWalReceiverTest p; }) pkgs.postgresqlVersions -// { - passthru.override = p: makePostgresqlWalReceiverTest p; -} +lib.recurseIntoAttrs ( + lib.concatMapAttrs (n: p: { ${n} = makePostgresqlWalReceiverTest p; }) pkgs.postgresqlVersions + // { + passthru.override = p: makePostgresqlWalReceiverTest p; + } +) diff --git a/nixos/tests/postgresql.nix b/nixos/tests/postgresql/postgresql.nix similarity index 96% rename from nixos/tests/postgresql.nix rename to nixos/tests/postgresql/postgresql.nix index 4f6c37643c25..56ec43d0a3b6 100644 --- a/nixos/tests/postgresql.nix +++ b/nixos/tests/postgresql/postgresql.nix @@ -1,9 +1,7 @@ -{ system ? builtins.currentSystem, - config ? {}, - pkgs ? import ../.. { inherit system config; } +{ pkgs +, makeTest }: -with import ../lib/testing-python.nix { inherit system pkgs; }; with pkgs.lib; let @@ -226,7 +224,9 @@ let ''; }; in -concatMapAttrs (n: p: { ${n} = testsForPackage p; }) pkgs.postgresqlVersions -// { - passthru.override = p: testsForPackage p; -} +recurseIntoAttrs ( + concatMapAttrs (n: p: { ${n} = testsForPackage p; }) pkgs.postgresqlVersions + // { + passthru.override = p: testsForPackage p; + } +) diff --git a/nixos/tests/timescaledb.nix b/nixos/tests/postgresql/timescaledb.nix similarity index 83% rename from nixos/tests/timescaledb.nix rename to nixos/tests/postgresql/timescaledb.nix index 6c6ba8ab6c6d..7f37e79bf094 100644 --- a/nixos/tests/timescaledb.nix +++ b/nixos/tests/postgresql/timescaledb.nix @@ -1,9 +1,7 @@ -{ system ? builtins.currentSystem -, config ? { } -, pkgs ? import ../.. { inherit system config; } +{ pkgs +, makeTest }: -with import ../lib/testing-python.nix { inherit system pkgs; }; with pkgs.lib; let @@ -83,7 +81,12 @@ let }; in -pkgs.lib.concatMapAttrs (n: p: { ${n} = makeTimescaleDbTest p; }) (filterAttrs (n: p: !p.pkgs.timescaledb.meta.broken) pkgs.postgresqlVersions) -// { - passthru.override = p: makeTimescaleDbTest p; -} +# Not run by default, because this requires allowUnfree. +# To run these tests: +# NIXPKGS_ALLOW_UNFREE=1 nix-build -A nixosTests.postgresql.timescaledb +dontRecurseIntoAttrs ( + pkgs.lib.concatMapAttrs (n: p: { ${n} = makeTimescaleDbTest p; }) (filterAttrs (n: p: !p.pkgs.timescaledb.meta.broken) pkgs.postgresqlVersions) + // { + passthru.override = p: makeTimescaleDbTest p; + } +) diff --git a/nixos/tests/tsja.nix b/nixos/tests/postgresql/tsja.nix similarity index 77% rename from nixos/tests/tsja.nix rename to nixos/tests/postgresql/tsja.nix index 493b6d56165e..dedda35540ac 100644 --- a/nixos/tests/tsja.nix +++ b/nixos/tests/postgresql/tsja.nix @@ -1,10 +1,7 @@ -{ system ? builtins.currentSystem -, config ? {} -, pkgs ? import ../.. { inherit system config; } +{ pkgs +, makeTest }: -with import ../lib/testing-python.nix { inherit system pkgs; }; - let makeTsjaTest = postgresqlPackage: makeTest { @@ -41,7 +38,9 @@ let ''; }; in -pkgs.lib.concatMapAttrs (n: p: { ${n} = makeTsjaTest p; }) pkgs.postgresqlVersions -// { - passthru.override = p: makeTsjaTest p; -} +pkgs.lib.recurseIntoAttrs ( + pkgs.lib.concatMapAttrs (n: p: { ${n} = makeTsjaTest p; }) pkgs.postgresqlVersions + // { + passthru.override = p: makeTsjaTest p; + } +) diff --git a/nixos/tests/postgresql/wal2json.nix b/nixos/tests/postgresql/wal2json.nix new file mode 100644 index 000000000000..782fc5c94f66 --- /dev/null +++ b/nixos/tests/postgresql/wal2json.nix @@ -0,0 +1,50 @@ +{ pkgs +, makeTest +}: + +let + inherit (pkgs) lib; + + makePostgresqlWal2jsonTest = + postgresqlPackage: + makeTest { + name = "wal2json-${postgresqlPackage.name}"; + meta.maintainers = with pkgs.lib.maintainers; [ euank ]; + + nodes.machine = { + services.postgresql = { + package = postgresqlPackage; + enable = true; + extraPlugins = with postgresqlPackage.pkgs; [ wal2json ]; + settings = { + wal_level = "logical"; + max_replication_slots = "10"; + max_wal_senders = "10"; + }; + }; + }; + + testScript = '' + machine.wait_for_unit("postgresql") + machine.succeed( + "sudo -u postgres psql -qAt -f ${./wal2json/example2.sql} postgres > /tmp/example2.out" + ) + machine.succeed( + "diff ${./wal2json/example2.out} /tmp/example2.out" + ) + machine.succeed( + "sudo -u postgres psql -qAt -f ${./wal2json/example3.sql} postgres > /tmp/example3.out" + ) + machine.succeed( + "diff ${./wal2json/example3.out} /tmp/example3.out" + ) + ''; + }; + +in +lib.recurseIntoAttrs ( + lib.concatMapAttrs (n: p: { ${n} = makePostgresqlWal2jsonTest p; }) pkgs.postgresqlVersions + // { + passthru.override = p: makePostgresqlWal2jsonTest p; + } +) diff --git a/pkgs/by-name/pg/pg-dump-anon/package.nix b/pkgs/by-name/pg/pg-dump-anon/package.nix index 96b6d351130f..a097eb8aa9c7 100644 --- a/pkgs/by-name/pg/pg-dump-anon/package.nix +++ b/pkgs/by-name/pg/pg-dump-anon/package.nix @@ -14,7 +14,7 @@ buildGoModule rec { vendorHash = "sha256-CwU1zoIayxvfnGL9kPdummPJiV+ECfSz4+q6gZGb8pw="; - passthru.tests = { inherit (nixosTests) pg_anonymizer; }; + passthru.tests = { inherit (nixosTests.postgresql) anonymizer; }; nativeBuildInputs = [ makeWrapper ]; postInstall = '' diff --git a/pkgs/servers/sql/postgresql/ext/anonymizer.nix b/pkgs/servers/sql/postgresql/ext/anonymizer.nix index 559f7db3f675..afb517c6b5a0 100644 --- a/pkgs/servers/sql/postgresql/ext/anonymizer.nix +++ b/pkgs/servers/sql/postgresql/ext/anonymizer.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation (finalAttrs: { EOF ''; - passthru.tests = nixosTests.pg_anonymizer.passthru.override postgresql; + passthru.tests = nixosTests.postgresql.anonymizer.passthru.override postgresql; meta = lib.getAttrs [ "homepage" "maintainers" "license" ] pg-dump-anon.meta // { description = "Extension to mask or replace personally identifiable information (PII) or commercially sensitive data from a PostgreSQL database"; diff --git a/pkgs/servers/sql/postgresql/ext/pgjwt.nix b/pkgs/servers/sql/postgresql/ext/pgjwt.nix index 0209ab27d59e..7bac053d920c 100644 --- a/pkgs/servers/sql/postgresql/ext/pgjwt.nix +++ b/pkgs/servers/sql/postgresql/ext/pgjwt.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation (finalAttrs: { passthru.updateScript = unstableGitUpdater { }; passthru.tests = lib.recurseIntoAttrs { - pgjwt = nixosTests.pgjwt.passthru.override postgresql; + pgjwt = nixosTests.postgresql.pgjwt.passthru.override postgresql; extension = postgresqlTestExtension { inherit (finalAttrs) finalPackage; diff --git a/pkgs/servers/sql/postgresql/ext/pgvecto-rs/default.nix b/pkgs/servers/sql/postgresql/ext/pgvecto-rs/default.nix index 40cde8eeae0b..f25afda0ca61 100644 --- a/pkgs/servers/sql/postgresql/ext/pgvecto-rs/default.nix +++ b/pkgs/servers/sql/postgresql/ext/pgvecto-rs/default.nix @@ -86,7 +86,7 @@ in passthru = { updateScript = nix-update-script { }; - tests = nixosTests.pgvecto-rs.passthru.override postgresql; + tests = nixosTests.postgresql.pgvecto-rs.passthru.override postgresql; }; meta = with lib; { diff --git a/pkgs/servers/sql/postgresql/ext/timescaledb.nix b/pkgs/servers/sql/postgresql/ext/timescaledb.nix index 7ddb887ec8ef..ab4736c5f7e9 100644 --- a/pkgs/servers/sql/postgresql/ext/timescaledb.nix +++ b/pkgs/servers/sql/postgresql/ext/timescaledb.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { done ''; - passthru.tests = nixosTests.timescaledb.passthru.override postgresql; + passthru.tests = nixosTests.postgresql.timescaledb.passthru.override postgresql; meta = with lib; { description = "Scales PostgreSQL for time-series data via automatic partitioning across time and space"; diff --git a/pkgs/servers/sql/postgresql/ext/timescaledb_toolkit.nix b/pkgs/servers/sql/postgresql/ext/timescaledb_toolkit.nix index 7665a4a15578..eec287ddcc10 100644 --- a/pkgs/servers/sql/postgresql/ext/timescaledb_toolkit.nix +++ b/pkgs/servers/sql/postgresql/ext/timescaledb_toolkit.nix @@ -25,7 +25,7 @@ passthru = { updateScript = nix-update-script { }; - tests = nixosTests.timescaledb.passthru.override postgresql; + tests = nixosTests.postgresql.timescaledb.passthru.override postgresql; }; # tests take really long diff --git a/pkgs/servers/sql/postgresql/ext/tsja.nix b/pkgs/servers/sql/postgresql/ext/tsja.nix index 38df785e7f7c..de19b047fe9c 100644 --- a/pkgs/servers/sql/postgresql/ext/tsja.nix +++ b/pkgs/servers/sql/postgresql/ext/tsja.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { mv dbinit_libtsja.txt $out/share/postgresql/extension/libtsja_dbinit.sql ''; - passthru.tests = nixosTests.tsja.passthru.override postgresql; + passthru.tests = nixosTests.postgresql.tsja.passthru.override postgresql; meta = with lib; { description = "PostgreSQL extension implementing Japanese text search"; diff --git a/pkgs/servers/sql/postgresql/ext/wal2json.nix b/pkgs/servers/sql/postgresql/ext/wal2json.nix index 25f56db52222..f7d581f2c8dd 100644 --- a/pkgs/servers/sql/postgresql/ext/wal2json.nix +++ b/pkgs/servers/sql/postgresql/ext/wal2json.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { install -D -t $out/share/postgresql/extension sql/*.sql ''; - passthru.tests = nixosTests.postgresql-wal2json.passthru.override postgresql; + passthru.tests = nixosTests.postgresql.wal2json.passthru.override postgresql; meta = with lib; { description = "PostgreSQL JSON output plugin for changeset extraction"; diff --git a/pkgs/servers/sql/postgresql/generic.nix b/pkgs/servers/sql/postgresql/generic.nix index 6c8530ce8b54..7d59f6349d57 100644 --- a/pkgs/servers/sql/postgresql/generic.nix +++ b/pkgs/servers/sql/postgresql/generic.nix @@ -312,12 +312,12 @@ 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; + postgresql = nixosTests.postgresql.postgresql.passthru.override finalAttrs.finalPackage; + postgresql-tls-client-cert = nixosTests.postgresql.postgresql-tls-client-cert.passthru.override finalAttrs.finalPackage; + postgresql-wal-receiver = nixosTests.postgresql.postgresql-wal-receiver.passthru.override finalAttrs.finalPackage; pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; } // lib.optionalAttrs jitSupport { - postgresql-jit = nixosTests.postgresql-jit.passthru.override finalAttrs.finalPackage; + postgresql-jit = nixosTests.postgresql.postgresql-jit.passthru.override finalAttrs.finalPackage; }; };