Unverified Commit 2d6c5c54 authored by Wolfgang Walther's avatar Wolfgang Walther Committed by GitHub
Browse files

postgresqlTestHook: shutdown on failure (#389938)

parents 797c149b 065fefd9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -251,6 +251,7 @@ pkgs/development/python-modules/buildcatrust/ @ajs124 @lukegb @mweinelt
/maintainers/scripts/kde @K900 @NickCao @SuperSandro2000 @ttuegel

# PostgreSQL and related stuff
/pkgs/by-name/po/postgresqlTestHook @NixOS/postgres
/pkgs/by-name/ps/psqlodbc @NixOS/postgres
/pkgs/servers/sql/postgresql @NixOS/postgres
/pkgs/development/tools/rust/cargo-pgrx @NixOS/postgres
+4 −2
Original line number Diff line number Diff line
preCheckHooks+=('postgresqlStart')
postCheckHooks+=('postgresqlStop')
preCheckHooks+=(postgresqlStart)
postCheckHooks+=(postgresqlStop)


postgresqlStart() {
@@ -69,6 +69,7 @@ EOF

  echo 'starting postgresql'
  eval "${postgresqlStartCommands:-pg_ctl start}"
  failureHooks+=(postgresqlStop)

  echo 'setting up postgresql'
  eval "$postgresqlTestSetupCommands"
@@ -80,4 +81,5 @@ EOF
postgresqlStop() {
  echo 'stopping postgresql'
  pg_ctl stop
  failureHooks=("${failureHooks[@]/postgresqlStop}")
}
+2 −3
Original line number Diff line number Diff line
@@ -7,10 +7,9 @@
  postgresql,
  postgresqlBuildExtension,
  runtimeShell,
  stdenv,
}:

postgresqlBuildExtension (finalAttrs: {
postgresqlBuildExtension {
  pname = "postgresql_anonymizer";

  inherit (pg-dump-anon) version src;
@@ -32,4 +31,4 @@ postgresqlBuildExtension (finalAttrs: {
  meta = lib.getAttrs [ "homepage" "teams" "license" ] pg-dump-anon.meta // {
    description = "Extension to mask or replace personally identifiable information (PII) or commercially sensitive data from a PostgreSQL database";
  };
})
}
+0 −1
Original line number Diff line number Diff line
@@ -5,7 +5,6 @@
  postgresql,
  postgresqlBuildExtension,
  postgresqlTestExtension,
  stdenv,
}:

let
+0 −1
Original line number Diff line number Diff line
@@ -7,7 +7,6 @@
  postgresql,
  postgresqlBuildExtension,
  postgresqlTestExtension,
  stdenv,
}:

postgresqlBuildExtension (finalAttrs: {
Loading