summaryrefslogtreecommitdiffstats
path: root/nixos/tests/docling-serve.nix
blob: f6880d6059d9fab977ba4e5cecb3dd09c21bf8c2 (plain)
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
28
{ lib, ... }:
let
  mainPort = "5001";
in
{
  name = "docling-serve";
  meta = {
    maintainers = [ ];
  };

  nodes = {
    machine =
      { ... }:
      {
        services.docling-serve = {
          enable = true;
        };
      };
  };

  testScript = ''
    machine.start()

    machine.wait_for_unit("docling-serve.service")
    machine.wait_for_open_port(${mainPort})
    machine.succeed("curl http://127.0.0.1:${mainPort}")
  '';
}