mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-09-29 07:32:58 +00:00
tests/pgadmin4-standalone: add
This commit is contained in:
parent
3cbd5a6deb
commit
ae2f179c9b
@ -394,6 +394,7 @@ in
|
||||
peerflix = handleTest ./peerflix.nix {};
|
||||
peertube = handleTestOn ["x86_64-linux"] ./web-apps/peertube.nix {};
|
||||
pgadmin4 = handleTest ./pgadmin4.nix {};
|
||||
pgadmin4-standalone = handleTest ./pgadmin4-standalone.nix {};
|
||||
pgjwt = handleTest ./pgjwt.nix {};
|
||||
pgmanage = handleTest ./pgmanage.nix {};
|
||||
php = handleTest ./php {};
|
||||
|
43
nixos/tests/pgadmin4-standalone.nix
Normal file
43
nixos/tests/pgadmin4-standalone.nix
Normal file
@ -0,0 +1,43 @@
|
||||
import ./make-test-python.nix ({ pkgs, lib, ... }:
|
||||
# This is seperate from pgadmin4 since we don't want both running at once
|
||||
|
||||
{
|
||||
name = "pgadmin4-standalone";
|
||||
meta.maintainers = with lib.maintainers; [ mkg20001 ];
|
||||
|
||||
nodes.machine = { pkgs, ... }: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
curl
|
||||
];
|
||||
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
|
||||
authentication = ''
|
||||
host all all localhost trust
|
||||
'';
|
||||
|
||||
ensureUsers = [
|
||||
{
|
||||
name = "postgres";
|
||||
ensurePermissions = {
|
||||
"DATABASE \"postgres\"" = "ALL PRIVILEGES";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
services.pgadmin = {
|
||||
enable = true;
|
||||
initialEmail = "bruh@localhost.de";
|
||||
initialPasswordFile = pkgs.writeText "pw" "bruh2012!";
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
machine.wait_for_unit("postgresql")
|
||||
machine.wait_for_unit("pgadmin")
|
||||
|
||||
machine.wait_until_succeeds("curl -s localhost:5050")
|
||||
'';
|
||||
})
|
@ -151,7 +151,7 @@ python3.pkgs.buildPythonApplication rec {
|
||||
];
|
||||
|
||||
passthru = {
|
||||
tests = { inherit (nixosTests) pgadmin4; };
|
||||
tests = { inherit (nixosTests) pgadmin4 pgadmin4-standalone; };
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
|
Loading…
Reference in New Issue
Block a user