Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
test: enable some of the core interface DHT tests
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
  • Loading branch information
Alan Shaw committed Oct 15, 2018
1 parent c26255d commit 3846b8a
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"expose-loader": "~0.7.5",
"form-data": "^2.3.2",
"hat": "0.0.3",
"interface-ipfs-core": "~0.78.0",
"interface-ipfs-core": "~0.79.0",
"ipfsd-ctl": "~0.39.1",
"mocha": "^5.2.0",
"ncp": "^2.0.0",
Expand Down
41 changes: 39 additions & 2 deletions test/core/interface.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,45 @@ describe('interface-ipfs-core tests', () => {

tests.dag(defaultCommonFactory)

tests.dht(defaultCommonFactory, {
skip: { reason: 'TODO: DHT is not implemented in js-ipfs yet!' }
const dhtCommonFactory = CommonFactory.create({
spawnOptions: {
initOptions: { bits: 512 },
EXPERIMENTAL: {
dht: true
}
}
})

tests.dht(dhtCommonFactory, {
skip: [
// dht.provide
{
name: 'should provide local CID',
reason: 'FIXME: Circuit not enabled and all transports failed to dial peer'
},
{
name: 'should allow multiple CIDs to be passed',
reason: 'FIXME: Circuit not enabled and all transports failed to dial peer'
},
{
name: 'should provide a CIDv1',
reason: 'FIXME: Circuit not enabled and all transports failed to dial peer'
},
// dht.get
{
name: 'should get a value after it was put on another node',
reason: 'FIXME: callback is not a function'
},
// dht.findprovs
{
name: 'should provide from one node and find it through another node',
reason: 'FIXME: Timeout of 80000ms exceeded'
},
{
name: 'should return the other node in the query',
reason: 'FIXME: always auto-skiped from within test'
}
]
})

tests.files(defaultCommonFactory)
Expand Down

0 comments on commit 3846b8a

Please sign in to comment.