1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-27 08:01:14 +00:00
nixpkgs/nixos/tests/limesurvey.nix

27 lines
655 B
Nix
Raw Normal View History

2020-01-26 11:32:47 +00:00
import ./make-test-python.nix ({ pkgs, ... }: {
2019-03-16 12:24:23 +00:00
name = "limesurvey";
meta.maintainers = [ pkgs.stdenv.lib.maintainers.aanderse ];
2020-01-26 11:32:47 +00:00
machine = { ... }: {
services.limesurvey = {
enable = true;
virtualHost = {
hostName = "example.local";
adminAddr = "root@example.local";
};
2019-03-16 12:24:23 +00:00
};
2020-01-26 11:32:47 +00:00
# limesurvey won't work without a dot in the hostname
networking.hosts."127.0.0.1" = [ "example.local" ];
};
2019-03-16 12:24:23 +00:00
testScript = ''
2020-01-26 11:32:47 +00:00
start_all()
2019-03-16 12:24:23 +00:00
2020-01-26 11:32:47 +00:00
machine.wait_for_unit("phpfpm-limesurvey.service")
assert "The following surveys are available" in machine.succeed(
"curl http://example.local/"
)
2019-03-16 12:24:23 +00:00
'';
})