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

Commit 99fb64e

Browse files
author
Alan Shaw
authored
test: enable some of the core interface DHT tests (#1634)
License: MIT Signed-off-by: Alan Shaw <[email protected]>
1 parent ad8b08d commit 99fb64e

File tree

1 file changed

+39
-2
lines changed

1 file changed

+39
-2
lines changed

test/core/interface.spec.js

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,45 @@ describe('interface-ipfs-core tests', () => {
3434

3535
tests.dag(defaultCommonFactory)
3636

37-
tests.dht(defaultCommonFactory, {
38-
skip: { reason: 'TODO: DHT is not implemented in js-ipfs yet!' }
37+
const dhtCommonFactory = CommonFactory.create({
38+
spawnOptions: {
39+
initOptions: { bits: 512 },
40+
EXPERIMENTAL: {
41+
dht: true
42+
}
43+
}
44+
})
45+
46+
tests.dht(dhtCommonFactory, {
47+
skip: isNode ? [
48+
// dht.provide
49+
{
50+
name: 'should provide local CID',
51+
reason: 'FIXME: Circuit not enabled and all transports failed to dial peer'
52+
},
53+
{
54+
name: 'should allow multiple CIDs to be passed',
55+
reason: 'FIXME: Circuit not enabled and all transports failed to dial peer'
56+
},
57+
{
58+
name: 'should provide a CIDv1',
59+
reason: 'FIXME: Circuit not enabled and all transports failed to dial peer'
60+
},
61+
// dht.get
62+
{
63+
name: 'should get a value after it was put on another node',
64+
reason: 'FIXME: callback is not a function'
65+
},
66+
// dht.findprovs
67+
{
68+
name: 'should provide from one node and find it through another node',
69+
reason: 'FIXME: Timeout of 80000ms exceeded'
70+
},
71+
{
72+
name: 'should return the other node in the query',
73+
reason: 'FIXME: always auto-skiped from within test'
74+
}
75+
] : true
3976
})
4077

4178
tests.files(defaultCommonFactory)

0 commit comments

Comments
 (0)