vuls: init at 0.27.0
[NixPkgs.git] / nixos / tests / devpi-server.nix
blob2a16d49724dbcb4b76e6e6f1dcbbe51a391df541
1 import ./make-test-python.nix ({pkgs, ...}: let
2   server-port = 3141;
3 in {
4   name = "devpi-server";
5   meta = with pkgs.lib.maintainers; {
6     maintainers = [cafkafk];
7   };
9   nodes = {
10     devpi = {...}: {
11       services.devpi-server = {
12         enable = true;
13         host = "0.0.0.0";
14         port = server-port;
15         openFirewall = true;
16         secretFile = pkgs.writeText "devpi-secret" "v263P+V3YGDYUyfYL/RBURw+tCPMDw94R/iCuBNJrDhaYrZYjpA6XPFVDDH8ViN20j77y2PHoMM/U0opNkVQ2g==";
17       };
18     };
20     client1 = {...}: {
21       environment.systemPackages = with pkgs; [
22         devpi-client
23         jq
24       ];
25     };
26   };
28   testScript = ''
29     start_all()
30     devpi.wait_for_unit("devpi-server.service")
31     devpi.wait_for_open_port(${builtins.toString server-port})
33     client1.succeed("devpi getjson http://devpi:${builtins.toString server-port}")
34   '';