about summary refs log tree commit diff
path: root/nixpkgs/nixos/tests/artalk.nix
blob: 1338e5cd380c6f31bee578e852ad55b676cae720 (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
28
import ./make-test-python.nix (
  { lib, pkgs, ... }:
  {

    name = "artalk";

    meta = {
      maintainers = with lib.maintainers; [ moraxyc ];
    };

    nodes.machine =
      { pkgs, ... }:
      {
        environment.systemPackages = [ pkgs.curl ];
        services.artalk = {
          enable = true;
        };
      };

    testScript = ''
      machine.wait_for_unit("artalk.service")

      machine.wait_for_open_port(23366)

      machine.succeed("curl --fail --max-time 10 http://127.0.0.1:23366/")
    '';
  }
)