summaryrefslogtreecommitdiffstats
path: root/nixos/tests/netfoil.nix
blob: 8697de95bdec22503e93f5f0997e499b5302a782 (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, ... }:
{
  name = "netfoil";
  meta.maintainers = with lib.maintainers; [
    marcusramberg
    sgo
  ];

  nodes = {
    one =
      { config, ... }:
      {
        services.netfoil = {
          enable = true;
          listen.port = 6353;
        };
      };
  };
  interactive.sshBackdoor.enable = true;

  testScript = ''
    start_all()

    with subtest("ensure netfoil starts and listens on 6353"):
        one.wait_for_unit("netfoil.service")
        one.wait_for_open_port(6353)
  '';
}