-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Awesome Endeavour: Circuit Relay #830
Changes from 16 commits
9aef6b7
e3957d2
72b6fb6
492fa16
c7fd99a
1742398
50b29e4
aa98ec0
c5c88aa
18f5a9a
983bfd9
61e1266
19d8555
36afc59
bad8232
05e19a0
cba1be2
409a523
ddcca8b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,48 @@ | ||
'use strict' | ||
|
||
const parallel = require('async/parallel') | ||
const ads = require('./test/utils/another-daemon-spawner') | ||
const js = ads.spawnJsNode | ||
const go = ads.spawnGoNode | ||
const stop = ads.stopNodes | ||
|
||
/* | ||
* spawns a daemon with ports numbers starting in 10 and ending in `num` | ||
*/ | ||
function start (done) { | ||
const base = '/ip4/127.0.0.1/tcp' | ||
|
||
if (!process.env.IPFS_TEST) { | ||
parallel([ | ||
(cb) => js([`${base}/10007`, `${base}/20007/ws`], true, 31007, 32007, cb), | ||
(cb) => js([`${base}/10008`, `${base}/20008/ws`], true, 31008, 32008, cb), | ||
(cb) => js([`${base}/10012`, `${base}/20012/ws`], true, 31012, 32012, cb), | ||
(cb) => js([`${base}/10013`, `${base}/20013/ws`], true, 31013, 32013, cb), | ||
(cb) => js([`${base}/10014`, `${base}/20014/ws`], true, 31014, 32014, cb), | ||
(cb) => js([`${base}/10015`, `${base}/20015/ws`], true, 31015, 32015, cb) | ||
], done) | ||
} else { | ||
parallel([ | ||
(cb) => go([`${base}/10027`, `${base}/20027/ws`], true, 33027, 44027, cb), | ||
(cb) => go([`${base}/10028`, `${base}/20028/ws`], true, 33028, 44028, cb), | ||
(cb) => go([`${base}/10031`, `${base}/20031/ws`], true, 33031, 44031, cb), | ||
(cb) => go([`${base}/10032`, `${base}/20032/ws`], true, 33032, 44032, cb) | ||
], done) | ||
} | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why can't the "Spawner" use IPFS Factory? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, what are the magic numbers? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The numbers are the preexisting port numbers that this daemons were being started with - I kept them because I believe some other tests might rely on them. |
||
|
||
module.exports = { | ||
karma: { | ||
files: [{ | ||
pattern: 'node_modules/interface-ipfs-core/test/fixtures/**/*', | ||
watched: false, | ||
served: true, | ||
included: false | ||
included: false, | ||
singleRun: false | ||
}] | ||
}, | ||
hooks: { | ||
pre: start, | ||
post: stop | ||
} | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dignifiedquire is there a way to select custom .aegir.js for different runs? Goal here is to have one for interop and another for unit There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. AFAIK, we can have |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you make these spawn daemon tools part of test/utils? This file should have a very declarative feel and just inform the dev what is going to be spawned for testing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, I'll move them over.