nixosTests.limesurvey: Port to python
This commit is contained in:
parent
f63ef280df
commit
4df1df986d
|
@ -1,21 +1,26 @@
|
||||||
import ./make-test.nix ({ pkgs, ... }: {
|
import ./make-test-python.nix ({ pkgs, ... }: {
|
||||||
name = "limesurvey";
|
name = "limesurvey";
|
||||||
meta.maintainers = [ pkgs.stdenv.lib.maintainers.aanderse ];
|
meta.maintainers = [ pkgs.stdenv.lib.maintainers.aanderse ];
|
||||||
|
|
||||||
machine =
|
machine = { ... }: {
|
||||||
{ ... }:
|
services.limesurvey = {
|
||||||
{ services.limesurvey.enable = true;
|
enable = true;
|
||||||
services.limesurvey.virtualHost.hostName = "example.local";
|
virtualHost = {
|
||||||
services.limesurvey.virtualHost.adminAddr = "root@example.local";
|
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 = ''
|
# limesurvey won't work without a dot in the hostname
|
||||||
startAll;
|
networking.hosts."127.0.0.1" = [ "example.local" ];
|
||||||
|
};
|
||||||
|
|
||||||
$machine->waitForUnit('phpfpm-limesurvey.service');
|
testScript = ''
|
||||||
$machine->succeed('curl http://example.local/') =~ /The following surveys are available/ or die;
|
start_all()
|
||||||
|
|
||||||
|
machine.wait_for_unit("phpfpm-limesurvey.service")
|
||||||
|
assert "The following surveys are available" in machine.succeed(
|
||||||
|
"curl http://example.local/"
|
||||||
|
)
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user