depot/third_party/nixpkgs/nixos/tests/limesurvey.nix
Default email d56f44df06 Project import generated by Copybara.
GitOrigin-RevId: bc4b9eef3ce3d5a90d8693e8367c9cbfc9fc1e13
2022-04-03 20:54:34 +02:00

26 lines
657 B
Nix

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/"
)
'';
})