Commit 0b5447a6 authored by Siraj Ravel's avatar Siraj Ravel

checking returned value

parent e6bc0772
...@@ -11,6 +11,7 @@ import ( ...@@ -11,6 +11,7 @@ import (
swarm "github.com/jbenet/go-ipfs/swarm" swarm "github.com/jbenet/go-ipfs/swarm"
u "github.com/jbenet/go-ipfs/util" u "github.com/jbenet/go-ipfs/util"
"bytes"
"fmt" "fmt"
"time" "time"
) )
...@@ -207,8 +208,8 @@ func TestProvides(t *testing.T) { ...@@ -207,8 +208,8 @@ func TestProvides(t *testing.T) {
t.Fatal(err) t.Fatal(err)
} }
_, err = dhts[3].getLocal(u.Key("hello")) bits, err := dhts[3].getLocal(u.Key("hello"))
if err != nil { if err != nil && bytes.Equal(bits, []byte("world")) {
t.Fatal(err) t.Fatal(err)
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment