nixpkgs/nixos/tests/roundcube.nix
2019-11-06 16:07:18 +01:00

31 lines
873 B
Nix

import ./make-test-python.nix ({ pkgs, ...} : {
name = "roundcube";
meta = with pkgs.stdenv.lib.maintainers; {
maintainers = [ globin ];
};
nodes = {
roundcube = { config, pkgs, ... }: {
services.roundcube = {
enable = true;
hostName = "roundcube";
database.password = "notproduction";
package = pkgs.roundcube.withPlugins (plugins: [ plugins.persistent_login ]);
plugins = [ "persistent_login" ];
};
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'")
'';
})