1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00

nixosTests.pgadmin4-standalone: format

Signed-off-by: Florian Brandes <florian.brandes@posteo.de>
This commit is contained in:
Florian Brandes 2023-02-07 11:48:24 +01:00
parent e4488f5efe
commit 2b63943be4

View file

@ -1,43 +1,43 @@
import ./make-test-python.nix ({ pkgs, lib, ... }:
# This is separate from pgadmin4 since we don't want both running at once
# This is separate from pgadmin4 since we don't want both running at once
{
name = "pgadmin4-standalone";
meta.maintainers = with lib.maintainers; [ mkg20001 ];
{
name = "pgadmin4-standalone";
meta.maintainers = with lib.maintainers; [ mkg20001 ];
nodes.machine = { pkgs, ... }: {
environment.systemPackages = with pkgs; [
curl
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.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")
services.pgadmin = {
enable = true;
initialEmail = "bruh@localhost.de";
initialPasswordFile = pkgs.writeText "pw" "bruh2012!";
};
};
machine.wait_until_succeeds("curl -s localhost:5050")
'';
})
testScript = ''
machine.wait_for_unit("postgresql")
machine.wait_for_unit("pgadmin")
machine.wait_until_succeeds("curl -s localhost:5050")
'';
})