summaryrefslogtreecommitdiffstats
path: root/nixos/tests/shelfmark.nix
blob: da91edce5f97121fffe1556691b67a35ac59867c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{ lib, ... }:
{
  name = "shelfmark";
  meta.maintainers = with lib.maintainers; [ jamiemagee ];

  nodes.machine = {
    services.shelfmark = {
      enable = true;
      environment.FLASK_HOST = "0.0.0.0";
    };
  };

  testScript = ''
    machine.wait_for_unit("shelfmark.service")
    machine.wait_for_open_port(8084)

    with subtest("Health endpoint responds"):
        machine.succeed("curl --fail http://localhost:8084/api/health")
  '';
}