2020-03-29 22:39:14 +02:00
|
|
|
import ./make-test-python.nix ({ pkgs, ... }:
|
2019-12-25 23:04:55 +01:00
|
|
|
|
|
|
|
{
|
|
|
|
name = "dokuwiki";
|
2020-03-29 22:39:14 +02:00
|
|
|
meta.maintainers = with pkgs.lib.maintainers; [ "1000101" ];
|
|
|
|
|
|
|
|
machine = { ... }: {
|
|
|
|
services.dokuwiki."site1.local" = {
|
|
|
|
acl = " ";
|
|
|
|
superUser = null;
|
|
|
|
nginx = {
|
|
|
|
forceSSL = false;
|
|
|
|
enableACME = false;
|
|
|
|
};
|
2019-12-25 23:04:55 +01:00
|
|
|
};
|
2020-03-29 22:39:14 +02:00
|
|
|
services.dokuwiki."site2.local" = {
|
|
|
|
acl = " ";
|
|
|
|
superUser = null;
|
|
|
|
nginx = {
|
|
|
|
forceSSL = false;
|
|
|
|
enableACME = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
networking.hosts."127.0.0.1" = [ "site1.local" "site2.local" ];
|
|
|
|
};
|
2019-12-25 23:04:55 +01:00
|
|
|
|
|
|
|
testScript = ''
|
2020-03-29 22:39:14 +02:00
|
|
|
site_names = ["site1.local", "site2.local"]
|
|
|
|
|
|
|
|
start_all()
|
|
|
|
|
|
|
|
machine.wait_for_unit("phpfpm-dokuwiki-site1.local.service")
|
|
|
|
machine.wait_for_unit("phpfpm-dokuwiki-site2.local.service")
|
|
|
|
|
2019-12-25 23:04:55 +01:00
|
|
|
machine.wait_for_unit("nginx.service")
|
2020-03-29 22:39:14 +02:00
|
|
|
|
2019-12-25 23:04:55 +01:00
|
|
|
machine.wait_for_open_port(80)
|
2020-03-29 22:39:14 +02:00
|
|
|
|
|
|
|
machine.succeed("curl -sSfL http://site1.local/ | grep 'DokuWiki'")
|
|
|
|
machine.succeed("curl -sSfL http://site2.local/ | grep 'DokuWiki'")
|
2019-12-25 23:04:55 +01:00
|
|
|
'';
|
|
|
|
})
|