@cryptotaxi247 / kubo / commits / e6bc0772e

Test for getLocal method in DHT

Siraj Ravel committed Sep 14, 2014 at 20:59 UTC e6bc0772ed4d34074652e6e397dd87363046321c
1 file changed +6
routing/dht/dht_test.go
+6
@@ -179,6 +179,7 @@ func TestValueGetSet(t *testing.T) {
179 if string(val) != "world" {
180 t.Fatalf("Expected 'world' got '%s'", string(val))
181 }
182 +
183 }
184
185 func TestProvides(t *testing.T) {
@@ -206,6 +207,11 @@ func TestProvides(t *testing.T) {
207 t.Fatal(err)
208 }
209
210 + _, err = dhts[3].getLocal(u.Key("hello"))
211 + if err != nil {
212 + t.Fatal(err)
213 + }
214 +
215 err = dhts[3].Provide(u.Key("hello"))
216 if err != nil {
217 t.Fatal(err)