about summary refs log tree commit diff
path: root/nixpkgs/nixos/tests/convos.nix
blob: 06d8d30fcb1487b2c6ee53059468abc4a2bb36be (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
import ./make-test-python.nix ({ 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}/")
  '';
})