Commit 179650d3 authored by Steven Allen's avatar Steven Allen

fix: update to go 1.15 lint warnings

parent 7ca6d63b
......@@ -2,6 +2,7 @@ package sessionmanager
import (
"context"
"fmt"
"sync"
"testing"
"time"
......@@ -118,7 +119,7 @@ func TestReceiveFrom(t *testing.T) {
pm := &fakePeerManager{}
sm := New(ctx, sessionFactory, sim, peerManagerFactory, bpm, pm, notif, "")
p := peer.ID(123)
p := peer.ID(fmt.Sprint(123))
block := blocks.NewBlock([]byte("block"))
firstSession := sm.NewSession(ctx, time.Second, delay.Fixed(time.Minute)).(*fakeSession)
......@@ -165,7 +166,7 @@ func TestReceiveBlocksWhenManagerShutdown(t *testing.T) {
pm := &fakePeerManager{}
sm := New(ctx, sessionFactory, sim, peerManagerFactory, bpm, pm, notif, "")
p := peer.ID(123)
p := peer.ID(fmt.Sprint(123))
block := blocks.NewBlock([]byte("block"))
firstSession := sm.NewSession(ctx, time.Second, delay.Fixed(time.Minute)).(*fakeSession)
......@@ -199,7 +200,7 @@ func TestReceiveBlocksWhenSessionContextCancelled(t *testing.T) {
pm := &fakePeerManager{}
sm := New(ctx, sessionFactory, sim, peerManagerFactory, bpm, pm, notif, "")
p := peer.ID(123)
p := peer.ID(fmt.Sprint(123))
block := blocks.NewBlock([]byte("block"))
firstSession := sm.NewSession(ctx, time.Second, delay.Fixed(time.Minute)).(*fakeSession)
......@@ -235,7 +236,7 @@ func TestShutdown(t *testing.T) {
pm := &fakePeerManager{}
sm := New(ctx, sessionFactory, sim, peerManagerFactory, bpm, pm, notif, "")
p := peer.ID(123)
p := peer.ID(fmt.Sprint(123))
block := blocks.NewBlock([]byte("block"))
cids := []cid.Cid{block.Cid()}
firstSession := sm.NewSession(ctx, time.Second, delay.Fixed(time.Minute)).(*fakeSession)
......
package testutil
import (
"fmt"
"math/rand"
bsmsg "github.com/ipfs/go-bitswap/message"
......@@ -59,7 +60,7 @@ func GeneratePeers(n int) []peer.ID {
peerIds := make([]peer.ID, 0, n)
for i := 0; i < n; i++ {
peerSeq++
p := peer.ID(peerSeq)
p := peer.ID(fmt.Sprint(i))
peerIds = append(peerIds, p)
}
return peerIds
......
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