2024-04-19 11:26:38 +00:00
|
|
|
import ./make-test-python.nix (
|
|
|
|
{ pkgs, ... }:
|
|
|
|
let
|
|
|
|
server-port = 3141;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
name = "devpi-server";
|
|
|
|
meta = with pkgs.lib.maintainers; {
|
|
|
|
maintainers = [ cafkafk ];
|
|
|
|
};
|
|
|
|
|
|
|
|
nodes = {
|
2024-12-10 19:26:33 +00:00
|
|
|
devpi =
|
2024-04-19 11:26:38 +00:00
|
|
|
{ ... }:
|
2024-12-10 19:26:33 +00:00
|
|
|
{
|
2024-04-19 11:26:38 +00:00
|
|
|
services.devpi-server = {
|
|
|
|
enable = true;
|
|
|
|
host = "0.0.0.0";
|
|
|
|
port = server-port;
|
|
|
|
openFirewall = true;
|
|
|
|
secretFile = pkgs.writeText "devpi-secret" "v263P+V3YGDYUyfYL/RBURw+tCPMDw94R/iCuBNJrDhaYrZYjpA6XPFVDDH8ViN20j77y2PHoMM/U0opNkVQ2g==";
|
2024-12-10 19:26:33 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-04-19 11:26:38 +00:00
|
|
|
client1 =
|
2024-12-10 19:26:33 +00:00
|
|
|
{ ... }:
|
|
|
|
{
|
2024-04-19 11:26:38 +00:00
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
devpi-client
|
|
|
|
jq
|
|
|
|
];
|
2024-12-10 19:26:33 +00:00
|
|
|
};
|
2024-04-19 11:26:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
testScript = ''
|
|
|
|
start_all()
|
|
|
|
devpi.wait_for_unit("devpi-server.service")
|
|
|
|
devpi.wait_for_open_port(${builtins.toString server-port})
|
|
|
|
|
|
|
|
client1.succeed("devpi getjson http://devpi:${builtins.toString server-port}")
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
)
|