diff --git a/nixos/modules/services/mail/roundcube.nix b/nixos/modules/services/mail/roundcube.nix index bdedfa1bb70..36dda619ad0 100644 --- a/nixos/modules/services/mail/roundcube.nix +++ b/nixos/modules/services/mail/roundcube.nix @@ -160,7 +160,7 @@ in ${pkgs.sudo}/bin/sudo -u ${pgSuperUser} psql postgres -c "create role ${cfg.database.username} with login password '${cfg.database.password}'"; ${pkgs.sudo}/bin/sudo -u ${pgSuperUser} psql postgres -c "create database ${cfg.database.dbname} with owner ${cfg.database.username}"; fi - PGPASSWORD=${cfg.database.password} ${pkgs.postgresql}/bin/psql -U ${cfg.database.username} \ + PGPASSWORD="${cfg.database.password}" ${pkgs.postgresql}/bin/psql -U ${cfg.database.username} \ -f ${cfg.package}/SQL/postgres.initial.sql \ -h ${cfg.database.host} ${cfg.database.dbname} touch /var/lib/roundcube/db-created diff --git a/nixos/tests/roundcube.nix b/nixos/tests/roundcube.nix index 3206144ce80..4dccb411ff4 100644 --- a/nixos/tests/roundcube.nix +++ b/nixos/tests/roundcube.nix @@ -9,7 +9,7 @@ import ./make-test-python.nix ({ pkgs, ...} : { services.roundcube = { enable = true; hostName = "roundcube"; - database.password = "notproduction"; + database.password = "not production"; package = pkgs.roundcube.withPlugins (plugins: [ plugins.persistent_login ]); plugins = [ "persistent_login" ]; }; @@ -21,10 +21,11 @@ import ./make-test-python.nix ({ pkgs, ...} : { }; 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 -sSL http://roundcube/ | grep 'Keep me logged in'") + $roundcube->start; + $roundcube->waitForUnit("postgresql.service"); + $roundcube->waitForUnit("roundcube-setup.service"); + $roundcube->waitForUnit("phpfpm-roundcube.service"); + $roundcube->waitForUnit("nginx.service"); + $roundcube->succeed("curl -sSfL http://roundcube/ | grep 'Keep me logged in'"); ''; })