From e6bc0772ed4d34074652e6e397dd87363046321c Mon Sep 17 00:00:00 2001 From: Siraj Ravel Date: Sun, 14 Sep 2014 20:59:09 -0700 Subject: [PATCH] Test for getLocal method in DHT --- routing/dht/dht_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/routing/dht/dht_test.go b/routing/dht/dht_test.go index 3b8f7f7d1..68812669c 100644 --- a/routing/dht/dht_test.go +++ b/routing/dht/dht_test.go @@ -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)