From a55a3be615e11b5b5c92556897f0be6ef4c622fd Mon Sep 17 00:00:00 2001 From: tavit ohanian Date: Sun, 22 Aug 2021 20:27:40 -0400 Subject: [PATCH] fix call to NewTestInstanceGenerator to pass bitswap options --- test/mock.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/mock.go b/test/mock.go index ec090ab..996e420 100644 --- a/test/mock.go +++ b/test/mock.go @@ -1,8 +1,11 @@ package bstest import ( + "time" + . "gitlab.dms3.io/dms3/go-blockservice" + bitswap "gitlab.dms3.io/dms3/go-bitswap" testinstance "gitlab.dms3.io/dms3/go-bitswap/testinstance" tn "gitlab.dms3.io/dms3/go-bitswap/testnet" delay "gitlab.dms3.io/dms3/go-dms3-delay" @@ -12,7 +15,8 @@ import ( // Mocks returns |n| connected mock Blockservices func Mocks(n int) []BlockService { net := tn.VirtualNetwork(mockrouting.NewServer(), delay.Fixed(0)) - sg := testinstance.NewTestInstanceGenerator(net) + bsOpts := []bitswap.Option{bitswap.ProvideEnabled(false), bitswap.ProviderSearchDelay(50 * time.Millisecond)} + sg := testinstance.NewTestInstanceGenerator(net, nil, bsOpts) instances := sg.Instances(n) -- GitLab