summaryrefslogtreecommitdiffstats
path: root/nixos/tests/convos.nix
blob: fd058829095075e6ce8505480e8911e2d3086d20 (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
{ lib, pkgs, ... }:

let
  port = 3333;
in
{
  name = "convos";
  meta.maintainers = with lib.maintainers; [ sgo ];

  nodes = {
    machine =
      { pkgs, ... }:
      {
        services.convos = {
          enable = true;
          listenPort = port;
        };
      };
  };

  testScript = ''
    machine.wait_for_unit("convos")
    machine.wait_for_open_port(${toString port})
    machine.succeed("curl -f http://localhost:${toString port}/")
  '';
}