about summary refs log tree commit diff
path: root/nixos/tests/sympa.nix
blob: 80daa4134f75a0884d4ddc8c59f82c204a1cd240 (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
29
30
31
32
33
34
35
import ./make-test-python.nix ({ pkgs, lib, ... }: {
  name = "sympa";
  meta.maintainers = with lib.maintainers; [ mmilata ];

  nodes.machine =
    { ... }:
    {

      services.sympa = {
        enable = true;
        domains = {
          "lists.example.org" = {
            webHost = "localhost";
          };
        };
        listMasters = [ "bob@example.org" ];
        web.enable = true;
        web.https = false;
        database = {
          type = "PostgreSQL";
          createLocally = true;
        };
      };
    };

  testScript = ''
    start_all()

    machine.wait_for_unit("sympa.service")
    machine.wait_for_unit("wwsympa.service")
    assert "Mailing lists service" in machine.succeed(
        "curl --fail --insecure -L http://localhost/"
    )
  '';
})