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

Commit 94b22e3

Browse files
author
Alan Shaw
committed
test: enable some of the core interface DHT tests
License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
1 parent 08f06b6 commit 94b22e3

File tree

2 files changed

+40
-3
lines changed

2 files changed

+40
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"expose-loader": "~0.7.5",
7272
"form-data": "^2.3.2",
7373
"hat": "0.0.3",
74-
"interface-ipfs-core": "~0.78.0",
74+
"interface-ipfs-core": "~0.79.0",
7575
"ipfsd-ctl": "~0.39.1",
7676
"mocha": "^5.2.0",
7777
"ncp": "^2.0.0",

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: [
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+
]
3976
})
4077

4178
tests.files(defaultCommonFactory)

0 commit comments

Comments
 (0)