summary refs log tree commit diff
path: root/nixos/tests/limesurvey.nix
blob: 9a3193991f352d2e88ed24555cc92498fa288278 (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
import ./make-test-python.nix ({ pkgs, ... }: {
  name = "limesurvey";
  meta.maintainers = [ pkgs.lib.maintainers.aanderse ];

  nodes.machine = { ... }: {
    services.limesurvey = {
      enable = true;
      virtualHost = {
        hostName = "example.local";
        adminAddr = "root@example.local";
      };
    };

    # limesurvey won't work without a dot in the hostname
    networking.hosts."127.0.0.1" = [ "example.local" ];
  };

  testScript = ''
    start_all()

    machine.wait_for_unit("phpfpm-limesurvey.service")
    assert "The following surveys are available" in machine.succeed(
        "curl -f http://example.local/"
    )
  '';
})