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";
|
2020-03-26 20:21:43 +03: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;
|
|
|
|
};
|
2019-06-06 04:19:11 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
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")
|
|
|
|
|
2020-09-16 01:43:39 +03:00
|
|
|
page = machine.succeed("curl -fL http://localhost/")
|
2019-12-01 04:44:49 +03:00
|
|
|
assert "MediaWiki has been installed" in page
|
2019-06-06 04:19:11 +03:00
|
|
|
'';
|
|
|
|
})
|