Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Fix 683 #688

Merged
merged 10 commits into from
Feb 12, 2018
Merged
Show file tree
Hide file tree
Changes from 4 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
1 change: 1 addition & 0 deletions .aegir.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
const createServer = require('ipfsd-ctl').createServer

const server = createServer()

module.exports = {
karma: {
files: [{
Expand Down
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@
"glob": false,
"fs": false,
"stream": "readable-stream",
"http": "stream-http"
"http": "stream-http",
"ipfs-api": false,
"ipfs": false,
"./node_modules/ipfsd-ctl/src/ipfsd-in-proc.js": false,
"./node_modules/ipfsd-ctl/src/factory-in-proc.js": false
},
"scripts": {
"test": "aegir test",
"test:node": "aegir test -t node",
"test:browser": "aegir test -t browser",
"test:browser": "node --max-old-space-size=8192 ./node_modules/.bin/aegir test -t browser",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still no luck. Kind of running out of my options here :(

Copy link
Contributor Author

@daviddias daviddias Feb 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vmx @pgte @dignifiedquire any Webpack wisdom to solve this issue? I'm using the latest ipfs/js-ipfsd-ctl#200 and no luck still.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, spoke too soon, IT RUUUNS :D

image

"test:webworker": "aegir test -t webworker",
"lint": "aegir lint",
"build": "aegir build",
Expand Down
9 changes: 5 additions & 4 deletions test/bitswap.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,18 @@ chai.use(dirtyChai)

const IPFSApi = require('../src')

const DaemonFactory = require('ipfsd-ctl')
const df = DaemonFactory.create()
const f = require('./utils/factory')

describe('.bitswap', function () {
this.timeout(20 * 1000) // slow CI

let ipfs
let ipfsd = null

before((done) => {
before(function (done) {
this.timeout(20 * 1000) // slow CI
df.spawn((err, _ipfsd) => {

f.spawn((err, _ipfsd) => {
expect(err).to.not.exist()
ipfsd = _ipfsd
ipfs = IPFSApi(_ipfsd.apiAddr)
Expand Down
6 changes: 2 additions & 4 deletions test/bootstrap.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ const expect = chai.expect
chai.use(dirtyChai)

const IPFSApi = require('../src')

const DaemonFactory = require('ipfsd-ctl')
const df = DaemonFactory.create()
const f = require('./utils/factory')

const invalidArg = 'this/Is/So/Invalid/'
const validIp4 = '/ip4/104.236.176.52/tcp/4001/ipfs/QmSoLnSGccFuZQJzRadHn95W2CrSFmZuTdDWP8HXaHca9z'
Expand All @@ -22,7 +20,7 @@ describe('.bootstrap', function () {
let ipfs

before((done) => {
df.spawn((err, _ipfsd) => {
f.spawn((err, _ipfsd) => {
expect(err).to.not.exist()
ipfsd = _ipfsd
ipfs = IPFSApi(_ipfsd.apiAddr)
Expand Down
5 changes: 2 additions & 3 deletions test/commands.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ chai.use(dirtyChai)

const IPFSApi = require('../src')

const DaemonFactory = require('ipfsd-ctl')
const df = DaemonFactory.create()
const f = require('./utils/factory')

describe('.commands', function () {
this.timeout(20 * 1000)
Expand All @@ -18,7 +17,7 @@ describe('.commands', function () {
let ipfs

before((done) => {
df.spawn((err, _ipfsd) => {
f.spawn((err, _ipfsd) => {
expect(err).to.not.exist()
ipfsd = _ipfsd
ipfs = IPFSApi(_ipfsd.apiAddr)
Expand Down
7 changes: 3 additions & 4 deletions test/constructor.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ const dirtyChai = require('dirty-chai')
const expect = chai.expect
chai.use(dirtyChai)

const DaemonFactory = require('ipfsd-ctl')
const df = DaemonFactory.create()

const f = require('./utils/factory')
const ipfsAPI = require('../src/index.js')

function clientWorks (client, done) {
Expand All @@ -28,7 +26,8 @@ describe('ipfs-api constructor tests', () => {

before(function (done) {
this.timeout(20 * 1000) // slow CI
df.spawn((err, node) => {

f.spawn((err, node) => {
expect(err).to.not.exist()
ipfsd = node
apiAddr = node.apiAddr.toString()
Expand Down
12 changes: 4 additions & 8 deletions test/diag.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,19 @@ chai.use(dirtyChai)
const os = require('os')

const IPFSApi = require('../src')

const DaemonFactory = require('ipfsd-ctl')
const df = DaemonFactory.create()
const f = require('./utils/factory')

describe('.diag', function () {
this.timeout(50 * 1000)

if (os.platform() === 'win32') {
it('skip these on Windows')
return
}
// go-ipfs does not support these on Windows
if (os.platform() === 'win32') { return }

let ipfsd
let ipfs

before((done) => {
df.spawn((err, _ipfsd) => {
f.spawn((err, _ipfsd) => {
expect(err).to.not.exist()
ipfsd = _ipfsd
ipfs = IPFSApi(_ipfsd.apiAddr)
Expand Down
6 changes: 2 additions & 4 deletions test/files.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ const mh = require('multihashes')
const CID = require('cids')

const IPFSApi = require('../src')

const DaemonFactory = require('ipfsd-ctl')
const df = DaemonFactory.create()
const f = require('./utils/factory')

const testfile = isNode
? loadFixture(__dirname, '/fixtures/testfile.txt')
Expand All @@ -41,7 +39,7 @@ describe('.files (the MFS API part)', function () {
const expectedMultihash = 'Qma4hjFTnCasJ8PVp3mZbZK5g2vGDT4LByLJ7m8ciyRFZP'

before((done) => {
df.spawn((err, _ipfsd) => {
f.spawn((err, _ipfsd) => {
expect(err).to.not.exist()
ipfsd = _ipfsd
ipfs = IPFSApi(_ipfsd.apiAddr)
Expand Down
6 changes: 2 additions & 4 deletions test/get.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ const series = require('async/series')
const loadFixture = require('aegir/fixtures')

const IPFSApi = require('../src')

const DaemonFactory = require('ipfsd-ctl')
const df = DaemonFactory.create()
const f = require('./utils/factory')

describe('.get (specific go-ipfs features)', function () {
this.timeout(20 * 1000)
Expand All @@ -33,7 +31,7 @@ describe('.get (specific go-ipfs features)', function () {

before((done) => {
series([
(cb) => df.spawn((err, _ipfsd) => {
(cb) => f.spawn((err, _ipfsd) => {
expect(err).to.not.exist()
ipfsd = _ipfsd
ipfs = IPFSApi(_ipfsd.apiAddr)
Expand Down
6 changes: 2 additions & 4 deletions test/interface/block.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,14 @@ const test = require('interface-ipfs-core')
const parallel = require('async/parallel')

const IPFSApi = require('../../src')

const DaemonFactory = require('ipfsd-ctl')
const df = DaemonFactory.create()
const f = require('../utils/factory')

const nodes = []
const common = {
setup: function (callback) {
callback(null, {
spawnNode: (cb) => {
df.spawn((err, _ipfsd) => {
f.spawn((err, _ipfsd) => {
if (err) {
return cb(err)
}
Expand Down
6 changes: 2 additions & 4 deletions test/interface/config.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,14 @@ const test = require('interface-ipfs-core')
const parallel = require('async/parallel')

const IPFSApi = require('../../src')

const DaemonFactory = require('ipfsd-ctl')
const df = DaemonFactory.create()
const f = require('../utils/factory')

const nodes = []
const common = {
setup: function (callback) {
callback(null, {
spawnNode: (cb) => {
df.spawn((err, _ipfsd) => {
f.spawn((err, _ipfsd) => {
if (err) {
return cb(err)
}
Expand Down
6 changes: 2 additions & 4 deletions test/interface/dht.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@ const test = require('interface-ipfs-core')
const parallel = require('async/parallel')

const IPFSApi = require('../../src')

const DaemonFactory = require('ipfsd-ctl')
const df = DaemonFactory.create()
const f = require('../utils/factory')

const nodes = []
const common = {
setup: function (callback) {
callback(null, {
spawnNode: (cb) => {
df.spawn((err, _ipfsd) => {
f.spawn((err, _ipfsd) => {
if (err) {
return cb(err)
}
Expand Down
6 changes: 2 additions & 4 deletions test/interface/files.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,14 @@ const test = require('interface-ipfs-core')
const parallel = require('async/parallel')

const IPFSApi = require('../../src')

const DaemonFactory = require('ipfsd-ctl')
const df = DaemonFactory.create()
const f = require('../utils/factory')

const nodes = []
const common = {
setup: function (callback) {
callback(null, {
spawnNode: (cb) => {
df.spawn((err, _ipfsd) => {
f.spawn((err, _ipfsd) => {
if (err) {
return cb(err)
}
Expand Down
6 changes: 2 additions & 4 deletions test/interface/key.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,14 @@ const test = require('interface-ipfs-core')
const parallel = require('async/parallel')

const IPFSApi = require('../../src')

const DaemonFactory = require('ipfsd-ctl')
const df = DaemonFactory.create()
const f = require('../utils/factory')

const nodes = []
const common = {
setup: function (callback) {
callback(null, {
spawnNode: (cb) => {
df.spawn((err, _ipfsd) => {
f.spawn((err, _ipfsd) => {
if (err) {
return cb(err)
}
Expand Down
6 changes: 2 additions & 4 deletions test/interface/miscellaneous.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@
const test = require('interface-ipfs-core')

const IPFSApi = require('../../src')

const DaemonFactory = require('ipfsd-ctl')
const df = DaemonFactory.create()
const f = require('../utils/factory')

const nodes = []
const common = {
setup: function (callback) {
callback(null, {
spawnNode: (cb) => {
df.spawn((err, _ipfsd) => {
f.spawn((err, _ipfsd) => {
if (err) {
return cb(err)
}
Expand Down
6 changes: 2 additions & 4 deletions test/interface/object.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,14 @@ const test = require('interface-ipfs-core')
const parallel = require('async/parallel')

const IPFSApi = require('../../src')

const DaemonFactory = require('ipfsd-ctl')
const df = DaemonFactory.create()
const f = require('../utils/factory')

const nodes = []
const common = {
setup: function (callback) {
callback(null, {
spawnNode: (cb) => {
df.spawn((err, _ipfsd) => {
f.spawn((err, _ipfsd) => {
if (err) {
return cb(err)
}
Expand Down
6 changes: 2 additions & 4 deletions test/interface/pin.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,14 @@ const test = require('interface-ipfs-core')
const parallel = require('async/parallel')

const IPFSApi = require('../../src')

const DaemonFactory = require('ipfsd-ctl')
const df = DaemonFactory.create()
const f = require('../utils/factory')

const nodes = []
const common = {
setup: function (callback) {
callback(null, {
spawnNode: (cb) => {
df.spawn((err, _ipfsd) => {
f.spawn((err, _ipfsd) => {
if (err) {
return cb(err)
}
Expand Down
6 changes: 2 additions & 4 deletions test/interface/pubsub.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,15 @@ const isNode = require('detect-node')
const parallel = require('async/parallel')

const IPFSApi = require('../../src')

const DaemonFactory = require('ipfsd-ctl')
const df = DaemonFactory.create()
const f = require('../utils/factory')

if (isNode) {
const nodes = []
const common = {
setup: function (callback) {
callback(null, {
spawnNode: (cb) => {
df.spawn({ args: ['--enable-pubsub-experiment'] },
f.spawn({ args: ['--enable-pubsub-experiment'] },
(err, _ipfsd) => {
if (err) {
return cb(err)
Expand Down
6 changes: 2 additions & 4 deletions test/interface/repo.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,14 @@ const test = require('interface-ipfs-core')
const parallel = require('async/parallel')

const IPFSApi = require('../../src')

const DaemonFactory = require('ipfsd-ctl')
const df = DaemonFactory.create()
const f = require('../utils/factory')

const nodes = []
const common = {
setup: function (callback) {
callback(null, {
spawnNode: (cb) => {
df.spawn((err, _ipfsd) => {
f.spawn((err, _ipfsd) => {
if (err) {
return cb(err)
}
Expand Down
6 changes: 2 additions & 4 deletions test/interface/stats.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,14 @@ const test = require('interface-ipfs-core')
const parallel = require('async/parallel')

const IPFSApi = require('../../src')

const DaemonFactory = require('ipfsd-ctl')
const df = DaemonFactory.create()
const f = require('../utils/factory')

const nodes = []
const common = {
setup: function (callback) {
callback(null, {
spawnNode: (cb) => {
df.spawn((err, _ipfsd) => {
f.spawn((err, _ipfsd) => {
if (err) {
return cb(err)
}
Expand Down
Loading