Skip to content

Commit

Permalink
Merge pull request ipfs/interface-go-ipfs-core#28 from ipfs/fix/dht-test
Browse files Browse the repository at this point in the history
tests: fix a bunch of small test lints/issues

This commit was moved from ipfs/interface-go-ipfs-core@0d5ec37
  • Loading branch information
Stebalien authored Apr 16, 2019
2 parents b3550bc + dabd168 commit 24263d0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions coreiface/tests/dht.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,17 +130,17 @@ func (tp *provider) TestDhtProvide(t *testing.T) {
t.Fatal(err)
}

provider := <-out
_, ok := <-out

if ok {
t.Fatal("did not expect to find any providers")
}

self0, err := apis[0].Key().Self(ctx)
if err != nil {
t.Fatal(err)
}

if provider.ID.String() != "<peer.ID >" {
t.Errorf("got wrong provider: %s != %s", provider.ID.String(), self0.ID().String())
}

err = apis[0].Dht().Provide(ctx, p)
if err != nil {
t.Fatal(err)
Expand All @@ -151,7 +151,7 @@ func (tp *provider) TestDhtProvide(t *testing.T) {
t.Fatal(err)
}

provider = <-out
provider := <-out

if provider.ID.String() != self0.ID().String() {
t.Errorf("got wrong provider: %s != %s", provider.ID.String(), self0.ID().String())
Expand Down

0 comments on commit 24263d0

Please sign in to comment.