Test for getLocal method in DHT

This commit is contained in:
Siraj Ravel 2014-09-14 20:59:09 -07:00
parent 3f4a4e1e7a
commit e6bc0772ed

View File

@ -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)