nixpkgs/nixos/tests/private-gpt.nix

30 lines
467 B
Nix
Raw Permalink Normal View History

{ pkgs, lib, ... }:
let
mainPort = "8001";
in
{
name = "private-gpt";
meta = with lib.maintainers; {
maintainers = [ ];
};
2024-04-24 15:15:25 +02:00
nodes = {
machine =
{ ... }:
{
services.private-gpt = {
enable = true;
};
};
};
2024-04-24 15:15:25 +02:00
testScript = ''
machine.start()
2024-04-24 15:15:25 +02:00
machine.wait_for_unit("private-gpt.service")
machine.wait_for_open_port(${mainPort})
2024-04-24 15:15:25 +02:00
machine.succeed("curl http://127.0.0.1:${mainPort}")
'';
}