mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-30 11:54:33 +03:00
Always override database config + exit tests on error
refs #6354, #6495 & #6599 - don't allow config.database to be merged, instead, override it always - make sure that route tests call done even when they error
This commit is contained in:
parent
39dfb2c09a
commit
2386a69f9d
@ -104,6 +104,12 @@ ConfigManager.prototype.set = function (config) {
|
||||
// local copy with properties that have been explicitly set.
|
||||
_.merge(this._config, config);
|
||||
|
||||
// Special case for the database config, which should be overridden not merged
|
||||
|
||||
if (config && config.database) {
|
||||
this._config.database = config.database;
|
||||
}
|
||||
|
||||
// Special case for the them.navigation JSON object, which should be overridden not merged
|
||||
if (config && config.theme && config.theme.navigation) {
|
||||
this._config.theme.navigation = config.theme.navigation;
|
||||
|
@ -49,6 +49,7 @@ describe('Admin Routing', function () {
|
||||
}).catch(function (e) {
|
||||
console.log('Ghost Error: ', e);
|
||||
console.log(e.stack);
|
||||
done(e);
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -36,6 +36,7 @@ describe('Channel Routes', function () {
|
||||
}).catch(function (e) {
|
||||
console.log('Ghost Error: ', e);
|
||||
console.log(e.stack);
|
||||
done(e);
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -46,6 +46,7 @@ describe('Frontend Routing', function () {
|
||||
}).catch(function (e) {
|
||||
console.log('Ghost Error: ', e);
|
||||
console.log(e.stack);
|
||||
done(e);
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user