diff options
author | Maciej Krüger <mkg20001@gmail.com> | 2022-02-23 15:16:23 +0100 |
---|---|---|
committer | Maciej Krüger <mkg20001@gmail.com> | 2022-02-26 14:27:30 +0100 |
commit | ae2f179c9b27f6d4c40e46a07b1d748ba53f3b33 (patch) | |
tree | 180b5caf602d9e7d7f4cbf8ae391b52508c92745 /nixos/tests | |
parent | 3cbd5a6deb68511189d19bfbf51b925b34830035 (diff) | |
download | nixlib-ae2f179c9b27f6d4c40e46a07b1d748ba53f3b33.tar nixlib-ae2f179c9b27f6d4c40e46a07b1d748ba53f3b33.tar.gz nixlib-ae2f179c9b27f6d4c40e46a07b1d748ba53f3b33.tar.bz2 nixlib-ae2f179c9b27f6d4c40e46a07b1d748ba53f3b33.tar.lz nixlib-ae2f179c9b27f6d4c40e46a07b1d748ba53f3b33.tar.xz nixlib-ae2f179c9b27f6d4c40e46a07b1d748ba53f3b33.tar.zst nixlib-ae2f179c9b27f6d4c40e46a07b1d748ba53f3b33.zip |
tests/pgadmin4-standalone: add
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/all-tests.nix | 1 | ||||
-rw-r--r-- | nixos/tests/pgadmin4-standalone.nix | 43 |
2 files changed, 44 insertions, 0 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 85f0a001e666..da94fc6d042d 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -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 {}; diff --git a/nixos/tests/pgadmin4-standalone.nix b/nixos/tests/pgadmin4-standalone.nix new file mode 100644 index 000000000000..442570c5306b --- /dev/null +++ b/nixos/tests/pgadmin4-standalone.nix @@ -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") + ''; + }) |