summaryrefslogtreecommitdiffstats
path: root/nixos/tests/fedimintd.nix
blob: ade63fcb252a117b4e1577b588a05e4ea3a1c51c (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
29
30
31
32
33
34
35
# This test runs the fedimintd and verifies that it starts

{ pkgs, ... }:

{
  name = "fedimintd";

  meta = with pkgs.lib.maintainers; {
    maintainers = [ dpc ];
  };

  nodes.machine =
    { ... }:
    {
      services.fedimintd."mainnet" = {
        enable = true;
        p2p = {
          url = "fedimint://example.com";
        };
        api_ws = {
          url = "wss://example.com";
        };
        environment = { };
      };
    };

  testScript =
    { nodes, ... }:
    ''
      start_all()

      machine.wait_for_unit("fedimintd-mainnet.service")
      machine.wait_for_open_port(${toString nodes.machine.services.fedimintd.mainnet.api_ws.port})
    '';
}