about summary refs log tree commit diff
path: root/nixos/tests/roundcube.nix
blob: 763f10a7a2dda2fda248b77b71008997835788cb (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
25
26
27
28
29
30
31
import ./make-test-python.nix ({ pkgs, ...} : {
  name = "roundcube";
  meta = with pkgs.lib.maintainers; {
    maintainers = [ globin ];
  };

  nodes = {
    roundcube = { config, pkgs, ... }: {
      services.roundcube = {
        enable = true;
        hostName = "roundcube";
        database.password = "not production";
        package = pkgs.roundcube.withPlugins (plugins: [ plugins.persistent_login ]);
        plugins = [ "persistent_login" ];
        dicts = with pkgs.aspellDicts; [ en fr de ];
      };
      services.nginx.virtualHosts.roundcube = {
        forceSSL = false;
        enableACME = false;
      };
    };
  };

  testScript = ''
    roundcube.start
    roundcube.wait_for_unit("postgresql.service")
    roundcube.wait_for_unit("phpfpm-roundcube.service")
    roundcube.wait_for_unit("nginx.service")
    roundcube.succeed("curl -sSfL http://roundcube/ | grep 'Keep me logged in'")
  '';
})