Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

feat: port to new ipfsd-ctl #5

Merged
merged 10 commits into from
Jan 25, 2018
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 11 additions & 24 deletions .aegir.js
Original file line number Diff line number Diff line change
@@ -1,36 +1,23 @@
'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'
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)
}
const createServer = require('ipfsd-ctl').createServer

const server = createServer()
module.exports = {
karma: {
files: [{
pattern: 'node_modules/interface-ipfs-core/test/fixtures/**/*',
pattern: 'test/fixtures/**/*',
watched: false,
served: true,
included: false,
singleRun: false
}]
included: false
}],
singleRun: true,
browserNoActivityTimeout: 100 * 1000
},
hooks: {
pre: start,
post: stop
browser: {
pre: server.start.bind(server),
post: server.stop.bind(server)
}
}
}
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
},
"scripts": {
"lint": "aegir lint",
"test": "aegir test -t node",
"test:nodejs": "aegir test -t node -f test/node.js",
"test:browser": "aegir test -t browser -f test/browser.js"
"test": "aegir test -t node -t browser --no-cors",
"test:node": "aegir test -t node -f test/node.js",
"test:browser": "aegir test -t browser --no-cors -f test/browser.js"
},
"pre-commit": [
"lint"
Expand Down Expand Up @@ -51,10 +51,11 @@
"eslint-plugin-react": "^7.5.1",
"expose-loader": "^0.7.4",
"form-data": "^2.3.1",
"go-ipfs-dep": "^0.4.13",
"hat": "0.0.3",
"ipfs": "^0.27.5",
"ipfs": "~0.27.7",
"ipfs-api": "^17.2.4",
"ipfsd-ctl": "~0.26.0",
"ipfsd-ctl": "~0.27.0",
"left-pad": "^1.2.0",
"lodash": "^4.17.4",
"mocha": "^4.0.1",
Expand Down
12 changes: 5 additions & 7 deletions test/browser.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/* eslint-env mocha */
'use strict'

describe('browser interop tests', () => {
it('need to get written', function (done) {
this.timeout(10 * 1000)
// for teardown time
setTimeout(done, 5 * 1000)
})
})
// require('./exchange-files')
// require('./pubsub')
require('./kad-dht')
require('./circuit-relay')
require('./repo')
Loading