Add integration test for global bans

This commit is contained in:
Calvin Montgomery 2017-06-05 22:45:14 -07:00
parent 8ad9b4e543
commit b80a87ba01
5 changed files with 119 additions and 9 deletions

View file

@ -48,8 +48,12 @@ class Database {
module.exports.Database = Database;
module.exports.init = function () {
db = new Database();
module.exports.init = function (newDB) {
if (newDB) {
db = newDB;
} else {
db = new Database();
}
db.knex.raw('select 1 from dual')
.catch(error => {
LOGGER.error('Initial database connection failed: %s', error.stack);