nixos/limesurvey: add basic nixos test

This commit is contained in:
Aaron Andersen 2019-03-16 08:24:23 -04:00
parent 5cf98d29e7
commit 73e175a6ce
2 changed files with 22 additions and 0 deletions

View File

@ -135,6 +135,7 @@ in
leaps = handleTest ./leaps.nix {};
lidarr = handleTest ./lidarr.nix {};
#lightdm = handleTest ./lightdm.nix {};
limesurvey = handleTest ./limesurvey.nix {};
login = handleTest ./login.nix {};
#logstash = handleTest ./logstash.nix {};
mailcatcher = handleTest ./mailcatcher.nix {};

View File

@ -0,0 +1,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;
'';
})