@cryptotaxi247 / kubo / commits / 0b5447a60

checking returned value

Siraj Ravel committed Sep 14, 2014 at 21:44 UTC 0b5447a60a55220cc0b3a6c776924aa4c4fd41e7
1 file changed +3 -2
routing/dht/dht_test.go
+3 -2
@@ -11,6 +11,7 @@ import (
11 swarm "github.com/jbenet/go-ipfs/swarm"
12 u "github.com/jbenet/go-ipfs/util"
13
14 + "bytes"
15 "fmt"
16 "time"
17 )
@@ -207,8 +208,8 @@ func TestProvides(t *testing.T) {
208 t.Fatal(err)
209 }
210
210 - _, err = dhts[3].getLocal(u.Key("hello"))
211 - if err != nil {
211 + bits, err := dhts[3].getLocal(u.Key("hello"))
212 + if err != nil && bytes.Equal(bits, []byte("world")) {
213 t.Fatal(err)
214 }
215