Merge pull request #134 from strongloop/add_mysql_ci_host
Add mysql CI host
This commit is contained in:
commit
f4e488a789
11
test/init.js
11
test/init.js
|
@ -3,15 +3,15 @@ module.exports = require('should');
|
||||||
var DataSource = require('loopback-datasource-juggler').DataSource;
|
var DataSource = require('loopback-datasource-juggler').DataSource;
|
||||||
|
|
||||||
var config = require('rc')('loopback', {test: {mysql: {}}}).test.mysql;
|
var config = require('rc')('loopback', {test: {mysql: {}}}).test.mysql;
|
||||||
|
console.log(config)
|
||||||
global.getConfig = function (options) {
|
global.getConfig = function (options) {
|
||||||
|
|
||||||
var dbConf = {
|
var dbConf = {
|
||||||
host: config.host || 'localhost',
|
host: process.env.TEST_MYSQL_HOST || config.host || 'localhost',
|
||||||
port: config.port || 3306,
|
port: process.env.TEST_MYSQL_PORT || config.port || 3306,
|
||||||
database: 'myapp_test',
|
database: 'myapp_test',
|
||||||
username: config.username,
|
username: process.env.TEST_MYSQL_USER || config.username,
|
||||||
password: config.password,
|
password: process.env.TEST_MYSQL_PASSWORD || config.password,
|
||||||
createDatabase: true
|
createDatabase: true
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -20,7 +20,6 @@ global.getConfig = function (options) {
|
||||||
dbConf[el] = options[el];
|
dbConf[el] = options[el];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return dbConf;
|
return dbConf;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue