nixpkgs/nixos/tests/moinmoin.nix

29 lines
914 B
Nix
Raw Normal View History

2019-11-30 23:55:22 +01:00
import ./make-test-python.nix ({ pkgs, lib, ... }: {
2019-07-16 01:06:19 +02:00
name = "moinmoin";
2019-11-30 23:55:22 +01:00
meta.maintainers = with lib.maintainers; [ mmilata ];
2019-07-16 01:06:19 +02:00
machine =
{ ... }:
{ services.moinmoin.enable = true;
services.moinmoin.wikis.ExampleWiki.superUsers = [ "admin" ];
services.moinmoin.wikis.ExampleWiki.webHost = "localhost";
services.nginx.virtualHosts.localhost.enableACME = false;
services.nginx.virtualHosts.localhost.forceSSL = false;
};
testScript = ''
2019-11-30 23:55:22 +01:00
start_all()
2019-07-16 01:06:19 +02:00
2019-11-30 23:55:22 +01:00
machine.wait_for_unit("moin-ExampleWiki.service")
machine.wait_for_unit("nginx.service")
machine.wait_for_file("/run/moin/ExampleWiki/gunicorn.sock")
assert "If you have just installed" in machine.succeed("curl -L http://localhost/")
assert "status success" in machine.succeed(
"moin-ExampleWiki account create --name=admin --email=admin@example.com --password=foo 2>&1"
)
2019-07-16 01:06:19 +02:00
'';
})