move always deploy on tests to deploy tracker

This commit is contained in:
Iuri Matias 2018-08-24 08:59:56 -04:00
parent 8f5b47adf4
commit c52142cb4c
2 changed files with 4 additions and 4 deletions

View File

@ -140,10 +140,6 @@ class ContractDeployer {
return next(); return next();
} }
// TODO find a better way to do that
if (process.env.isTest) {
return self.deployContract(contract, next);
}
self.plugins.emitAndRunActionsForEvent('deploy:contract:shouldDeploy', {contract: contract, shouldDeploy: true}, function(_err, params) { self.plugins.emitAndRunActionsForEvent('deploy:contract:shouldDeploy', {contract: contract, shouldDeploy: true}, function(_err, params) {
let trackedContract = params.contract; let trackedContract = params.contract;
if (!params.shouldDeploy) { if (!params.shouldDeploy) {

View File

@ -26,6 +26,10 @@ class DeployTracker {
}); });
self.embark.registerActionForEvent("deploy:contract:shouldDeploy", (params, cb) => { self.embark.registerActionForEvent("deploy:contract:shouldDeploy", (params, cb) => {
if (process.env.isTest) {
return cb(params);
}
let contract = params.contract; let contract = params.contract;
let trackedContract = self.getContract(contract.className, contract.realRuntimeBytecode, contract.realArgs); let trackedContract = self.getContract(contract.className, contract.realRuntimeBytecode, contract.realArgs);
if (trackedContract) { if (trackedContract) {