Skip to content

Commit

Permalink
Test for getLocal method in DHT
Browse files Browse the repository at this point in the history
  • Loading branch information
llSourcell committed Sep 15, 2014
1 parent 3f4a4e1 commit e6bc077
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions routing/dht/dht_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit e6bc077

Please sign in to comment.