From 948647235213723675dc1d427e5c4cfc65214683 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Tue, 12 Nov 2024 21:02:10 +0100 Subject: [PATCH] nixosTests.postgresql: run tests with JIT as well This was intended for quite some time already, but ever since enableJIT was changed to be the source of truth of JIT-iness for the PostgreSQL module, this hasn't worked for the tests anymore. --- nixos/tests/postgresql/anonymizer.nix | 1 + nixos/tests/postgresql/pgjwt.nix | 1 + nixos/tests/postgresql/pgvecto-rs.nix | 7 ++++--- nixos/tests/postgresql/postgresql-tls-client-cert.nix | 1 + nixos/tests/postgresql/postgresql-wal-receiver.nix | 1 + nixos/tests/postgresql/postgresql.nix | 4 +++- nixos/tests/postgresql/timescaledb.nix | 1 + nixos/tests/postgresql/tsja.nix | 1 + nixos/tests/postgresql/wal2json.nix | 1 + 9 files changed, 14 insertions(+), 4 deletions(-) diff --git a/nixos/tests/postgresql/anonymizer.nix b/nixos/tests/postgresql/anonymizer.nix index 3a5f69086eaa..44d79c2213a6 100644 --- a/nixos/tests/postgresql/anonymizer.nix +++ b/nixos/tests/postgresql/anonymizer.nix @@ -19,6 +19,7 @@ let services.postgresql = { inherit package; enable = true; + enableJIT = lib.hasInfix "-jit-" package.name; extraPlugins = ps: [ ps.anonymizer ]; settings.shared_preload_libraries = [ "anon" ]; }; diff --git a/nixos/tests/postgresql/pgjwt.nix b/nixos/tests/postgresql/pgjwt.nix index 81e5dac41ada..87622d54fcac 100644 --- a/nixos/tests/postgresql/pgjwt.nix +++ b/nixos/tests/postgresql/pgjwt.nix @@ -23,6 +23,7 @@ let services.postgresql = { inherit package; enable = true; + enableJIT = lib.hasInfix "-jit-" package.name; extraPlugins = ps: with ps; [ pgjwt diff --git a/nixos/tests/postgresql/pgvecto-rs.nix b/nixos/tests/postgresql/pgvecto-rs.nix index 9d8389eecf99..702c55c38dac 100644 --- a/nixos/tests/postgresql/pgvecto-rs.nix +++ b/nixos/tests/postgresql/pgvecto-rs.nix @@ -24,9 +24,9 @@ let ''; makeTestFor = - postgresqlPackage: + package: makeTest { - name = "pgvecto-rs-${postgresqlPackage.name}"; + name = "pgvecto-rs-${package.name}"; meta = with lib.maintainers; { maintainers = [ diogotcorreia ]; }; @@ -35,8 +35,9 @@ let { ... }: { services.postgresql = { + inherit package; enable = true; - package = postgresqlPackage; + enableJIT = lib.hasInfix "-jit-" package.name; extraPlugins = ps: with ps; [ pgvecto-rs diff --git a/nixos/tests/postgresql/postgresql-tls-client-cert.nix b/nixos/tests/postgresql/postgresql-tls-client-cert.nix index d7cddb625256..0dcdaf98eaf7 100644 --- a/nixos/tests/postgresql/postgresql-tls-client-cert.nix +++ b/nixos/tests/postgresql/postgresql-tls-client-cert.nix @@ -50,6 +50,7 @@ let services.postgresql = { inherit package; enable = true; + enableJIT = lib.hasInfix "-jit-" package.name; enableTCPIP = true; ensureUsers = [ { diff --git a/nixos/tests/postgresql/postgresql-wal-receiver.nix b/nixos/tests/postgresql/postgresql-wal-receiver.nix index 5c1551c5f2fd..579a56153386 100644 --- a/nixos/tests/postgresql/postgresql-wal-receiver.nix +++ b/nixos/tests/postgresql/postgresql-wal-receiver.nix @@ -31,6 +31,7 @@ let services.postgresql = { inherit package; enable = true; + enableJIT = lib.hasInfix "-jit-" package.name; settings = { max_replication_slots = 10; max_wal_senders = 10; diff --git a/nixos/tests/postgresql/postgresql.nix b/nixos/tests/postgresql/postgresql.nix index 509a14411de9..55f61cc97227 100644 --- a/nixos/tests/postgresql/postgresql.nix +++ b/nixos/tests/postgresql/postgresql.nix @@ -40,8 +40,9 @@ let { ... }: { services.postgresql = { - inherit (package) ; + inherit package; enable = true; + enableJIT = lib.hasInfix "-jit-" package.name; }; services.postgresqlBackup = { @@ -158,6 +159,7 @@ let services.postgresql = { inherit package; enable = true; + enableJIT = lib.hasInfix "-jit-" package.name; ensureUsers = [ { name = "all-clauses"; diff --git a/nixos/tests/postgresql/timescaledb.nix b/nixos/tests/postgresql/timescaledb.nix index b29d59c744f0..8586a0db1bbd 100644 --- a/nixos/tests/postgresql/timescaledb.nix +++ b/nixos/tests/postgresql/timescaledb.nix @@ -53,6 +53,7 @@ let services.postgresql = { inherit package; enable = true; + enableJIT = lib.hasInfix "-jit-" package.name; extraPlugins = ps: with ps; [ timescaledb diff --git a/nixos/tests/postgresql/tsja.nix b/nixos/tests/postgresql/tsja.nix index 7c976da21b68..26d83f052a66 100644 --- a/nixos/tests/postgresql/tsja.nix +++ b/nixos/tests/postgresql/tsja.nix @@ -20,6 +20,7 @@ let services.postgresql = { inherit package; enable = true; + enableJIT = lib.hasInfix "-jit-" package.name; extraPlugins = ps: with ps; [ tsja diff --git a/nixos/tests/postgresql/wal2json.nix b/nixos/tests/postgresql/wal2json.nix index 551254a68ebd..aca3d5aa8954 100644 --- a/nixos/tests/postgresql/wal2json.nix +++ b/nixos/tests/postgresql/wal2json.nix @@ -16,6 +16,7 @@ let services.postgresql = { inherit package; enable = true; + enableJIT = lib.hasInfix "-jit-" package.name; extraPlugins = with package.pkgs; [ wal2json ]; settings = { wal_level = "logical";