Allow tests to work without a cloudron.conf on disk

This commit is contained in:
Johannes Zellner
2017-11-15 02:40:50 +01:00
parent c0c35964fe
commit 25146e1134

View File

@@ -69,7 +69,9 @@ function baseDir() {
}
var cloudronConfigFileName = path.join(baseDir(), 'configs/cloudron.conf');
assert(fs.existsSync(cloudronConfigFileName), 'No cloudron.conf found, cannot proceed');
// only tests can run without a config file on disk, they use the defaults with runtime overrides
if (exports.CLOUDRON) assert(fs.existsSync(cloudronConfigFileName), 'No cloudron.conf found, cannot proceed');
function saveSync() {
// only save values we want to have in the cloudron.conf, see start.sh