2019-12-01 04:44:49 +03:00
|
|
|
import ./make-test-python.nix ({ pkgs, lib, ... }: {
|
2019-06-06 04:19:11 +03:00
|
|
|
name = "mediawiki";
|
|
|
|
meta.maintainers = [ lib.maintainers.aanderse ];
|
|
|
|
|
|
|
|
machine =
|
|
|
|
{ ... }:
|
|
|
|
{ services.mediawiki.enable = true;
|
|
|
|
services.mediawiki.virtualHost.hostName = "localhost";
|
|
|
|
services.mediawiki.virtualHost.adminAddr = "root@example.com";
|
|
|
|
services.mediawiki.passwordFile = pkgs.writeText "password" "correcthorsebatterystaple";
|
|
|
|
};
|
|
|
|
|
|
|
|
testScript = ''
|
2019-12-01 04:44:49 +03:00
|
|
|
start_all()
|
2019-06-06 04:19:11 +03:00
|
|
|
|
2019-12-01 04:44:49 +03:00
|
|
|
machine.wait_for_unit("phpfpm-mediawiki.service")
|
|
|
|
|
|
|
|
page = machine.succeed("curl -L http://localhost/")
|
|
|
|
assert "MediaWiki has been installed" in page
|
2019-06-06 04:19:11 +03:00
|
|
|
'';
|
|
|
|
})
|