about summary refs log tree commit diff
path: root/nixos/tests/private-gpt.nix
blob: d19e167cc303ca91b2dcb65de8310a0369b8198f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import ./make-test-python.nix ({ pkgs, lib, ... }:
let
  mainPort = "8001";
in
{
  name = "private-gpt";
  meta = with lib.maintainers; {
    maintainers = [ drupol ];
  };

  nodes = {
    machine = { ... }: {
      services.private-gpt = {
        enable = true;
      };
    };
  };

  testScript = ''
    machine.start()

    machine.wait_for_unit("private-gpt.service")
    machine.wait_for_open_port(${mainPort})

    machine.succeed("curl http://127.0.0.1:${mainPort}")
  '';
})