Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit 02a25b8

Browse files
committed
chore: start echo server before tests
1 parent e0f4e9b commit 02a25b8

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

.aegir.js

+18-4
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
const IPFSFactory = require('ipfsd-ctl')
44
const parallel = require('async/parallel')
55
const MockPreloadNode = require('./test/utils/mock-preload-node')
6+
const EchoServer = require('interface-ipfs-core/src/utils/echo-http-server')
67

78
const ipfsdServer = IPFSFactory.createServer()
89
const preloadNode = MockPreloadNode.createNode()
10+
const echoServer = EchoServer.createServer()
911

1012
module.exports = {
1113
bundlesize: { maxSize: '689kB' },
@@ -26,8 +28,18 @@ module.exports = {
2628
},
2729
hooks: {
2830
node: {
29-
pre: (cb) => preloadNode.start(cb),
30-
post: (cb) => preloadNode.stop(cb)
31+
pre: (cb) => {
32+
parallel([
33+
(cb) => preloadNode.start(cb),
34+
(cb) => echoServer.start(cb)
35+
], cb)
36+
},
37+
post: (cb) => {
38+
parallel([
39+
(cb) => preloadNode.stop(cb),
40+
(cb) => echoServer.stop(cb)
41+
], cb)
42+
}
3143
},
3244
browser: {
3345
pre: (cb) => {
@@ -36,7 +48,8 @@ module.exports = {
3648
ipfsdServer.start()
3749
cb()
3850
},
39-
(cb) => preloadNode.start(cb)
51+
(cb) => preloadNode.start(cb),
52+
(cb) => echoServer.start(cb)
4053
], cb)
4154
},
4255
post: (cb) => {
@@ -45,7 +58,8 @@ module.exports = {
4558
ipfsdServer.stop()
4659
cb()
4760
},
48-
(cb) => preloadNode.stop(cb)
61+
(cb) => preloadNode.stop(cb),
62+
(cb) => echoServer.stop(cb)
4963
], cb)
5064
}
5165
}

0 commit comments

Comments
 (0)