From 0b5447a60a55220cc0b3a6c776924aa4c4fd41e7 Mon Sep 17 00:00:00 2001 From: Siraj Ravel Date: Sun, 14 Sep 2014 21:44:19 -0700 Subject: [PATCH] checking returned value --- routing/dht/dht_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/routing/dht/dht_test.go b/routing/dht/dht_test.go index 68812669c85..f5323086448 100644 --- a/routing/dht/dht_test.go +++ b/routing/dht/dht_test.go @@ -11,6 +11,7 @@ import ( swarm "github.com/jbenet/go-ipfs/swarm" u "github.com/jbenet/go-ipfs/util" + "bytes" "fmt" "time" ) @@ -207,8 +208,8 @@ func TestProvides(t *testing.T) { t.Fatal(err) } - _, err = dhts[3].getLocal(u.Key("hello")) - if err != nil { + bits, err := dhts[3].getLocal(u.Key("hello")) + if err != nil && bytes.Equal(bits, []byte("world")) { t.Fatal(err) }