diff --git a/.travis.yml b/.travis.yml index 0831d9d8d7..a4b0fb3ab4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,9 +15,10 @@ language: node_js sudo: false dist: trusty env: - - CXX=g++-4.8 DB=mongodb - - CXX=g++-4.8 DB=redis - - CXX=g++-4.8 DB=postgres + - CXX=g++-4.8 DB=mongodb NODE_ENV=production + - CXX=g++-4.8 DB=mongodb NODE_ENV=development + - CXX=g++-4.8 DB=redis NODE_ENV=production + - CXX=g++-4.8 DB=postgres NODE_ENV=production addons: apt: sources: diff --git a/test/mocks/databasemock.js b/test/mocks/databasemock.js index 7624877a75..c27f9a0790 100644 --- a/test/mocks/databasemock.js +++ b/test/mocks/databasemock.js @@ -5,12 +5,15 @@ * ATTENTION: testing db is flushed before every use! */ + var async = require('async'); var path = require('path'); var nconf = require('nconf'); var url = require('url'); -var errorText; +global.env = process.env.NODE_ENV || 'production'; + +var errorText; var packageInfo = require('../../package'); var winston = require('winston'); @@ -91,6 +94,7 @@ if (testDbConfig.database === productionDbConfig.database && nconf.set(dbType, testDbConfig); winston.info('database config %s', dbType, testDbConfig); +winston.info('environment ' + global.env); var db = require('../../src/database'); module.exports = db;