mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-26 04:47:45 +08:00
Test for getLocal method in DHT
This commit is contained in:
parent
3f4a4e1e7a
commit
e6bc0772ed
@ -179,6 +179,7 @@ func TestValueGetSet(t *testing.T) {
|
||||
if string(val) != "world" {
|
||||
t.Fatalf("Expected 'world' got '%s'", string(val))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func TestProvides(t *testing.T) {
|
||||
@ -206,6 +207,11 @@ func TestProvides(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
_, err = dhts[3].getLocal(u.Key("hello"))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
err = dhts[3].Provide(u.Key("hello"))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user