about summary refs log tree commit diff
path: root/nixos/tests/moinmoin.nix
blob: 2662b79aa0995e97753adf5997e3729831da7203 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import ./make-test.nix ({ pkgs, lib, ... }: {
  name = "moinmoin";
  meta.maintainers = [ ]; # waiting for https://github.com/NixOS/nixpkgs/pull/65397

  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 = ''
    startAll;

    $machine->waitForUnit('moin-ExampleWiki.service');
    $machine->waitForUnit('nginx.service');
    $machine->waitForFile('/run/moin/ExampleWiki/gunicorn.sock');
    $machine->succeed('curl -L http://localhost/') =~ /If you have just installed/ or die;
    $machine->succeed('moin-ExampleWiki account create --name=admin --email=admin@example.com --password=foo 2>&1') =~ /status success/ or die;
  '';
})