2020-04-24 23:36:52 +00:00
|
|
|
import ./make-test-python.nix ({ pkgs, lib, ... }: {
|
|
|
|
name = "mediawiki";
|
|
|
|
meta.maintainers = [ lib.maintainers.aanderse ];
|
|
|
|
|
2022-04-03 18:54:34 +00:00
|
|
|
nodes.machine =
|
2020-04-24 23:36:52 +00:00
|
|
|
{ ... }:
|
|
|
|
{ services.mediawiki.enable = true;
|
|
|
|
services.mediawiki.virtualHost.hostName = "localhost";
|
|
|
|
services.mediawiki.virtualHost.adminAddr = "root@example.com";
|
|
|
|
services.mediawiki.passwordFile = pkgs.writeText "password" "correcthorsebatterystaple";
|
2020-05-03 17:38:23 +00:00
|
|
|
services.mediawiki.extensions = {
|
|
|
|
Matomo = pkgs.fetchzip {
|
|
|
|
url = "https://github.com/DaSchTour/matomo-mediawiki-extension/archive/v4.0.1.tar.gz";
|
|
|
|
sha256 = "0g5rd3zp0avwlmqagc59cg9bbkn3r7wx7p6yr80s644mj6dlvs1b";
|
|
|
|
};
|
|
|
|
ParserFunctions = null;
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
testScript = ''
|
|
|
|
start_all()
|
|
|
|
|
|
|
|
machine.wait_for_unit("phpfpm-mediawiki.service")
|
|
|
|
|
2020-10-27 00:29:36 +00:00
|
|
|
page = machine.succeed("curl -fL http://localhost/")
|
2020-04-24 23:36:52 +00:00
|
|
|
assert "MediaWiki has been installed" in page
|
|
|
|
'';
|
|
|
|
})
|