summary refs log tree commit diff
path: root/nixos/tests/limesurvey.nix
blob: ad66ada106b711181372b12a8996e180b1eccb42 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import ./make-test.nix ({ pkgs, ... }: {
  name = "limesurvey";
  meta.maintainers = [ pkgs.stdenv.lib.maintainers.aanderse ];

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

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

  testScript = ''
    startAll;

    $machine->waitForUnit('phpfpm-limesurvey.service');
    $machine->succeed('curl http://example.local/') =~ /The following surveys are available/ or die;
  '';
})