Skip to content

Commit

Permalink
checking returned value
Browse files Browse the repository at this point in the history
  • Loading branch information
llSourcell committed Sep 15, 2014
1 parent e6bc077 commit 0b5447a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions routing/dht/dht_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
swarm "github.com/jbenet/go-ipfs/swarm"
u "github.com/jbenet/go-ipfs/util"

"bytes"
"fmt"
"time"
)
Expand Down Expand Up @@ -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)
}

Expand Down

0 comments on commit 0b5447a

Please sign in to comment.