Commit bb4eca86 authored by Jeromy's avatar Jeromy Committed by Juan Batiz-Benet

remove testing imports from non testing code

rename bserv mock to mock_test

swap out testing.T for an interface
parent 7b2d310c
package blockservice
import (
"testing"
bitswap "github.com/ipfs/go-ipfs/exchange/bitswap"
tn "github.com/ipfs/go-ipfs/exchange/bitswap/testnet"
mockrouting "github.com/ipfs/go-ipfs/routing/mock"
delay "github.com/ipfs/go-ipfs/thirdparty/delay"
)
type fataler interface {
Fatal(args ...interface{})
}
// Mocks returns |n| connected mock Blockservices
func Mocks(t *testing.T, n int) []*BlockService {
func Mocks(t fataler, n int) []*BlockService {
net := tn.VirtualNetwork(mockrouting.NewServer(), delay.Fixed(0))
sg := bitswap.NewTestSessionGenerator(net)
......
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