1 import ./make-test-python.nix ({ pkgs, lib, ...}:
5 meta = with lib.maintainers; {
6 maintainers = [ spinus willibutz ];
12 services.postgresql = {
14 extraPlugins = ps: with ps; [ pgjwt pgtap ];
19 testScript = { nodes, ... }:
21 sqlSU = "${nodes.master.services.postgresql.superUser}";
22 pgProve = "${pkgs.perlPackages.TAPParserSourceHandlerpgTAP}";
26 master.wait_for_unit("postgresql")
28 "${pkgs.gnused}/bin/sed -e '12 i SET search_path TO tap,public;' ${pgjwt.src}/test.sql > /tmp/test.sql"
31 "${pkgs.sudo}/bin/sudo -u ${sqlSU} PGOPTIONS=--search_path=tap,public ${pgProve}/bin/pg_prove -d postgres -v -f /tmp/test.sql"