fix error messages for non deployed contracts

This commit is contained in:
Jonathan Rainville 2018-06-01 11:30:02 -04:00
parent eeb88010d5
commit e5ec461f78
1 changed files with 6 additions and 2 deletions

View File

@ -32,6 +32,7 @@ class Test {
this.contracts = {}; this.contracts = {};
this.events = new Events(); this.events = new Events();
this.ready = true; this.ready = true;
this.builtContracts = {};
this.web3 = new Web3(); this.web3 = new Web3();
if (this.simOptions.node) { if (this.simOptions.node) {
@ -52,6 +53,10 @@ class Test {
logger: new TestLogger({logLevel: 'debug'}) logger: new TestLogger({logLevel: 'debug'})
}); });
this.versions_default = this.engine.config.contractsConfig.versions;
// Reset contract config to nothing to make sure we deploy only what we want
this.engine.config.contractsConfig = {contracts: {}, versions: this.versions_default};
this.engine.startService("libraryManager"); this.engine.startService("libraryManager");
this.engine.startService("codeRunner"); this.engine.startService("codeRunner");
this.engine.startService("web3", { this.engine.startService("web3", {
@ -109,8 +114,7 @@ class Test {
const self = this; const self = this;
async.waterfall([ async.waterfall([
function getConfig(next) { function getConfig(next) {
let _versions_default = self.engine.config.contractsConfig.versions; self.engine.config.contractsConfig = {contracts: config.contracts, versions: self.versions_default};
self.engine.config.contractsConfig = {contracts: config.contracts, versions: _versions_default};
self.engine.events.emit(constants.events.contractConfigChanged, self.engine.config.contractsConfig); self.engine.events.emit(constants.events.contractConfigChanged, self.engine.config.contractsConfig);
next(); next();
}, },