fix tests, enable blockchain component by default

This commit is contained in:
Iuri Matias 2018-04-02 14:44:55 -04:00
parent d3b0787895
commit 10f7d21f81
2 changed files with 6 additions and 3 deletions

View File

@ -63,10 +63,10 @@ Config.prototype.reloadConfig = function() {
this.loadChainTrackerFile();
};
Config.prototype._mergeConfig = function(configFilePath, defaultConfig, env) {
Config.prototype._mergeConfig = function(configFilePath, defaultConfig, env, enabledByDefault) {
if (!configFilePath) {
let configToReturn = defaultConfig['default'] || {};
configToReturn.enabled = false;
configToReturn.enabled = enabledByDefault || false;
return configToReturn;
}
@ -102,7 +102,9 @@ Config.prototype.loadBlockchainConfigFile = function() {
}
};
this.blockchainConfig = this._mergeConfig("blockchain.json", configObject, this.env);
let configFilePath = this._getFileOrOject(this.configDir, 'blockchain.json', 'blockchain');
this.blockchainConfig = this._mergeConfig(configFilePath, configObject, this.env, true);
};
Config.prototype.loadContractsConfigFile = function() {

View File

@ -4,6 +4,7 @@
"buildDir": "build/",
"config": {
"contracts": "contracts.json",
"blockchain": false,
"storage": false,
"communication": false,
"webserver": false