git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #94617 from dadada/dadada/dokuwiki
258ca64Marek Mahut
nixos/tests/dokuwiki.nix+10−1
@@ -41,7 +41,7 @@ in {
41 superUser = "admin";
41 superUser = "admin";
42 };
42 };
43 services.dokuwiki."site2.local" = {
43 services.dokuwiki."site2.local" = {
44− aclUse = true;
44+ usersFile = "/var/lib/dokuwiki/site2.local/users.auth.php";
45 superUser = "admin";
45 superUser = "admin";
46 templates = [ template-bootstrap3 ];
46 templates = [ template-bootstrap3 ];
47 plugins = [ plugin-icalevents ];
47 plugins = [ plugin-icalevents ];
@@ -62,6 +62,15 @@ in {
62 machine.wait_for_open_port(80)
62 machine.wait_for_open_port(80)
63
63
64 machine.succeed("curl -sSfL http://site1.local/ | grep 'DokuWiki'")
64 machine.succeed("curl -sSfL http://site1.local/ | grep 'DokuWiki'")
65+ machine.fail("curl -sSfL 'http://site1.local/doku.php?do=login' | grep 'Login'")
66+
65 machine.succeed("curl -sSfL http://site2.local/ | grep 'DokuWiki'")
67 machine.succeed("curl -sSfL http://site2.local/ | grep 'DokuWiki'")
68+ machine.succeed("curl -sSfL 'http://site2.local/doku.php?do=login' | grep 'Login'")
69+
70+ machine.succeed(
71+ "echo 'admin:$2y$10$ijdBQMzSVV20SrKtCna8gue36vnsbVm2wItAXvdm876sshI4uwy6S:Admin:admin@example.test:user' >> /var/lib/dokuwiki/site2.local/users.auth.php",
72+ "curl -sSfL -d 'u=admin&p=password' --cookie-jar cjar 'http://site2.local/doku.php?do=login'",
73+ "curl -sSfL --cookie cjar --cookie-jar cjar 'http://site2.local/doku.php?do=login' | grep 'Logged in as: <bdi>Admin</bdi>'",
74+ )
66 '';
75 '';
67})
76})