mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-09 13:26:10 +00:00
feat(@embark/tests): enable comms and storage in tests
But only enabled at the start and not changed per test
This commit is contained in:
parent
de9e667794
commit
aecb99d428
@ -749,9 +749,20 @@ class EmbarkController {
|
||||
engine.registerModuleGroup("tests", options);
|
||||
engine.registerModulePackage('embark-deploy-tracker', {plugins: engine.plugins, trackContracts: false});
|
||||
engine.registerModuleGroup("namesystem");
|
||||
engine.registerModuleGroup("storage");
|
||||
engine.registerModuleGroup("communication");
|
||||
|
||||
engine.startEngine(next);
|
||||
},
|
||||
function startNodes(next) {
|
||||
Promise.all([
|
||||
engine.events.request2("storage:node:start", engine.config.storageConfig),
|
||||
engine.events.request2("communication:node:start", engine.config.communicationConfig),
|
||||
engine.events.request2("namesystem:node:start", engine.config.namesystemConfig)
|
||||
]).then(() => {
|
||||
next();
|
||||
}).catch(next);
|
||||
},
|
||||
function setupTestEnvironment(next) {
|
||||
engine.events.request2('tests:run', options, next);
|
||||
}
|
||||
|
@ -68,16 +68,10 @@ class MochaTestRunner {
|
||||
});
|
||||
},
|
||||
(next) => {
|
||||
events.request('tests:config:check', cfg, (err, needResetEmbarkJS) => {
|
||||
events.request('tests:config:check', cfg, (err) => {
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
if (needResetEmbarkJS) {
|
||||
// TODO add back this event?
|
||||
// events.request("runcode:embarkjs:reset", (err) => {
|
||||
// next(err, accounts);
|
||||
// });
|
||||
}
|
||||
next();
|
||||
});
|
||||
},
|
||||
|
@ -38,7 +38,6 @@ export default class Namesystem {
|
||||
});
|
||||
}
|
||||
|
||||
// TODO START PLS
|
||||
startNode(namesystemConfig, cb) {
|
||||
if (!namesystemConfig.enabled) {
|
||||
return cb();
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { __ } from 'embark-i18n';
|
||||
import {buildUrl, deconstructUrl, recursiveMerge, prepareContractsConfig} from "embark-utils";
|
||||
import {buildUrl, deconstructUrl, recursiveMerge} from "embark-utils";
|
||||
const assert = require('assert').strict;
|
||||
const async = require('async');
|
||||
const chalk = require('chalk');
|
||||
@ -32,9 +32,7 @@ class TestRunner {
|
||||
this.simOptions = {};
|
||||
|
||||
this.moduleConfigs = {
|
||||
namesystem: {},
|
||||
storage: {},
|
||||
communication: {}
|
||||
namesystem: {}
|
||||
};
|
||||
|
||||
this.events.setCommandHandler('tests:run', (options, callback) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user