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

ipfsFactory - Tests that require more than one IPFS node #53

Closed
daviddias opened this issue Aug 6, 2016 · 1 comment
Closed

ipfsFactory - Tests that require more than one IPFS node #53

daviddias opened this issue Aug 6, 2016 · 1 comment

Comments

@daviddias
Copy link
Contributor

Some API calls require more than one node to be active, otherwise they fail or timeout (also considered failure), for example: name, DHT and swarm tests.

Our current:

var test = require('interface-ipfs-core')

var common = {
  setup: function (cb) {
    cb(null, yourIPFSInstance)
  },
  teardown: function (cb) {
    cb()
  }
}

// use all of the test suits
test.all(common)

Needs to be upgraded to:

var test = require('interface-ipfs-core')

var common = {
  setup: function (cb) {
    cb(null, ipfsFactory)
  },
  teardown: function (cb) {
    cb()
  }
}

// use all of the test suits
test.all(common)

Where ipfsFactory has a method to spawn a new node

ipfsFactory.spawnNode((err, node)

More, since we already learned from js-ipfs-api and js-ipfs that is useful to spawn nodes with custom configs (e.g: mdns off; no boostrap nodes, etc). What we really need is

ipfsFactory.spawnNode(config, (err, node)
@daviddias daviddias changed the title Tests that require more than one IPFS node ipfsFactory - Tests that require more than one IPFS node Aug 10, 2016
@daviddias
Copy link
Contributor Author

Happening here -> #57

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant