summaryrefslogtreecommitdiffstats
path: root/nixos/tests/bitbox-bridge.nix
blob: ab1140e2511cb32feef240a97c47f3b73eb6ddb9 (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
{ lib, ... }:

let
  testPort = 8179;
in
{
  name = "bitbox-bridge";
  meta.maintainers = with lib.maintainers; [
    izelnakri
    tensor5
  ];

  nodes.machine = {
    services.bitbox-bridge = {
      enable = true;
      port = testPort;
      runOnMount = false;
    };
  };

  testScript = ''
    start_all()
    machine.wait_for_unit("bitbox-bridge.service")
    machine.wait_for_open_port(${toString testPort})
    machine.wait_until_succeeds("curl -fL http://localhost:${toString testPort}/api/info | grep version")
  '';
}