Merge pull request #71407 from f--t/fix/roundcube

roundcube: fix -- quoting string env variable
This commit is contained in:
Robin Gloster 2019-11-20 09:25:10 +01:00 committed by GitHub
commit 5f7bcffe21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 7 deletions

View File

@ -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

View File

@ -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'");
'';
})