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

test: enable some of the core interface DHT tests #1634

Merged
merged 2 commits into from
Nov 2, 2018
Merged
Changes from all 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
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: isNode ? [
// 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'
}
] : true
})

tests.files(defaultCommonFactory)
Expand Down