about summary refs log tree commit diff
path: root/nixos/tests/alloy.nix
blob: 814a21d1e95230ef4431c240f40c0f5ad7e79297 (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
28
29
30
31
32
import ./make-test-python.nix ({ lib, pkgs, ... }:

  let
    nodes = {
      machine = {
        services.alloy = {
          enable = true;
        };
        environment.etc."alloy/config.alloy".text = "";
      };
    };
  in
  {
    name = "alloy";

    meta = with lib.maintainers; {
      maintainers = [ flokli ];
    };

    inherit nodes;

    testScript = ''
      start_all()

      machine.wait_for_unit("alloy.service")
      machine.wait_for_open_port(12345)
      machine.succeed(
          "curl -sSfN http://127.0.0.1:12345/-/healthy"
      )
      machine.shutdown()
    '';
  })