mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 03:55:55 +01:00
chore(deps): update dependency eslint-config-airbnb-base to v13 (#6599)
* chore(deps): update dependency eslint-config-airbnb-base to v13 * chore: #6599, linting 😬
This commit is contained in:
committed by
Julian Lam
parent
eb0a322d7f
commit
64b9dabff8
@@ -14,9 +14,9 @@ var url = require('url');
|
||||
|
||||
global.env = process.env.TEST_ENV || 'production';
|
||||
|
||||
var winston = require('winston');
|
||||
var packageInfo = require('../../package');
|
||||
|
||||
var winston = require('winston');
|
||||
winston.add(new winston.transports.Console({
|
||||
format: winston.format.combine(
|
||||
winston.format.splat(),
|
||||
@@ -45,47 +45,47 @@ var productionDbConfig = nconf.get(dbType);
|
||||
if (!testDbConfig) {
|
||||
const errorText = 'test_database is not defined';
|
||||
winston.info(
|
||||
'\n===========================================================\n' +
|
||||
'Please, add parameters for test database in config.json\n' +
|
||||
'For example (redis):\n' +
|
||||
'"test_database": {\n' +
|
||||
' "host": "127.0.0.1",\n' +
|
||||
' "port": "6379",\n' +
|
||||
' "password": "",\n' +
|
||||
' "database": "1"\n' +
|
||||
'}\n' +
|
||||
' or (mongo):\n' +
|
||||
'"test_database": {\n' +
|
||||
' "host": "127.0.0.1",\n' +
|
||||
' "port": "27017",\n' +
|
||||
' "password": "",\n' +
|
||||
' "database": "1"\n' +
|
||||
'}\n' +
|
||||
' or (mongo) in a replicaset\n' +
|
||||
'"test_database": {\n' +
|
||||
' "host": "127.0.0.1,127.0.0.1,127.0.0.1",\n' +
|
||||
' "port": "27017,27018,27019",\n' +
|
||||
' "username": "",\n' +
|
||||
' "password": "",\n' +
|
||||
' "database": "nodebb_test"\n' +
|
||||
'}\n' +
|
||||
' or (postgres):\n' +
|
||||
'"test_database": {\n' +
|
||||
' "host": "127.0.0.1",\n' +
|
||||
' "port": "5432",\n' +
|
||||
' "username": "postgres",\n' +
|
||||
' "password": "",\n' +
|
||||
' "database": "nodebb_test"\n' +
|
||||
'}\n' +
|
||||
'==========================================================='
|
||||
'\n===========================================================\n'
|
||||
+ 'Please, add parameters for test database in config.json\n'
|
||||
+ 'For example (redis):\n'
|
||||
+ '"test_database": {\n'
|
||||
+ ' "host": "127.0.0.1",\n'
|
||||
+ ' "port": "6379",\n'
|
||||
+ ' "password": "",\n'
|
||||
+ ' "database": "1"\n'
|
||||
+ '}\n'
|
||||
+ ' or (mongo):\n'
|
||||
+ '"test_database": {\n'
|
||||
+ ' "host": "127.0.0.1",\n'
|
||||
+ ' "port": "27017",\n'
|
||||
+ ' "password": "",\n'
|
||||
+ ' "database": "1"\n'
|
||||
+ '}\n'
|
||||
+ ' or (mongo) in a replicaset\n'
|
||||
+ '"test_database": {\n'
|
||||
+ ' "host": "127.0.0.1,127.0.0.1,127.0.0.1",\n'
|
||||
+ ' "port": "27017,27018,27019",\n'
|
||||
+ ' "username": "",\n'
|
||||
+ ' "password": "",\n'
|
||||
+ ' "database": "nodebb_test"\n'
|
||||
+ '}\n'
|
||||
+ ' or (postgres):\n'
|
||||
+ '"test_database": {\n'
|
||||
+ ' "host": "127.0.0.1",\n'
|
||||
+ ' "port": "5432",\n'
|
||||
+ ' "username": "postgres",\n'
|
||||
+ ' "password": "",\n'
|
||||
+ ' "database": "nodebb_test"\n'
|
||||
+ '}\n'
|
||||
+ '==========================================================='
|
||||
);
|
||||
winston.error(errorText);
|
||||
throw new Error(errorText);
|
||||
}
|
||||
|
||||
if (testDbConfig.database === productionDbConfig.database &&
|
||||
testDbConfig.host === productionDbConfig.host &&
|
||||
testDbConfig.port === productionDbConfig.port) {
|
||||
if (testDbConfig.database === productionDbConfig.database
|
||||
&& testDbConfig.host === productionDbConfig.host
|
||||
&& testDbConfig.port === productionDbConfig.port) {
|
||||
const errorText = 'test_database has the same config as production db';
|
||||
winston.error(errorText);
|
||||
throw new Error(errorText);
|
||||
|
||||
Reference in New Issue
Block a user