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

Commit

Permalink
feat: port to new ipfsd-ctl (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
dryajov authored and daviddias committed Jan 25, 2018
1 parent 2cd707c commit 41ee565
Show file tree
Hide file tree
Showing 17 changed files with 146 additions and 803 deletions.
35 changes: 11 additions & 24 deletions .aegir.js
@@ -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
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
11 changes: 4 additions & 7 deletions test/browser.js
@@ -1,10 +1,7 @@
/* 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('./repo')
167 changes: 0 additions & 167 deletions test/circuit-relay.js

This file was deleted.

0 comments on commit 41ee565

Please sign in to comment.