mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-23 11:27:42 +08:00
limit optimistic provide test to legacy provider
This commit is contained in:
parent
46bf19211c
commit
6c15a941ae
@ -17,13 +17,14 @@ func TestDHTOptimisticProvide(t *testing.T) {
|
||||
|
||||
nodes[0].UpdateConfig(func(cfg *config.Config) {
|
||||
cfg.Experimental.OptimisticProvide = true
|
||||
// Optimistic provide only works with the legacy provider.
|
||||
cfg.Provide.DHT.SweepEnabled = config.False
|
||||
})
|
||||
|
||||
nodes.StartDaemons().Connect()
|
||||
|
||||
hash := nodes[0].IPFSAddStr(string(random.Bytes(100)))
|
||||
nodes[0].IPFS("routing", "provide", hash)
|
||||
waitUntilProvidesComplete(t, nodes[0])
|
||||
|
||||
res := nodes[1].IPFS("routing", "findprovs", "--num-providers=1", hash)
|
||||
assert.Equal(t, nodes[0].PeerID().String(), res.Stdout.Trimmed())
|
||||
|
||||
Loading…
Reference in New Issue
Block a user