Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

fix staticcheck #75

Merged
merged 1 commit into from
May 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions test/mock.go
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
package bstest

import (
. "github.com/ipfs/go-blockservice"

testinstance "github.com/ipfs/go-bitswap/testinstance"
tn "github.com/ipfs/go-bitswap/testnet"
"github.com/ipfs/go-blockservice"
delay "github.com/ipfs/go-ipfs-delay"
mockrouting "github.com/ipfs/go-ipfs-routing/mock"
)

// Mocks returns |n| connected mock Blockservices
func Mocks(n int) []BlockService {
func Mocks(n int) []blockservice.BlockService {
net := tn.VirtualNetwork(mockrouting.NewServer(), delay.Fixed(0))
sg := testinstance.NewTestInstanceGenerator(net)

instances := sg.Instances(n)

var servs []BlockService
var servs []blockservice.BlockService
for _, i := range instances {
servs = append(servs, New(i.Blockstore(), i.Exchange))
servs = append(servs, blockservice.New(i.Blockstore(), i.Exchange))
}
return servs
}