fix tests

This commit is contained in:
vyzo 2020-09-07 19:46:58 +03:00
parent 81e674ad36
commit e3aaedbc33
4 changed files with 6 additions and 8 deletions

View File

@ -32,6 +32,7 @@ import (
"github.com/filecoin-project/lotus/node"
"github.com/filecoin-project/lotus/node/impl"
"github.com/filecoin-project/lotus/node/modules"
"github.com/filecoin-project/lotus/node/modules/dtypes"
"github.com/filecoin-project/lotus/node/repo"
)
@ -46,8 +47,6 @@ func init() {
}
power.ConsensusMinerMinPower = big.NewInt(2048)
verifreg.MinVerifiedDealSize = big.NewInt(256)
modules.PubsubSubscribeImmediately = true
}
const source = 0
@ -233,6 +232,7 @@ func (tu *syncTestUtil) addSourceNode(gen int) {
node.Repo(sourceRepo),
node.MockHost(tu.mn),
node.Test(),
node.Override(new(dtypes.Bootstrapper), dtypes.Bootstrapper(true)),
node.Override(new(modules.Genesis), modules.LoadGenesis(genesis)),
)
@ -265,6 +265,7 @@ func (tu *syncTestUtil) addClientNode() int {
node.Repo(repo.NewMemory(nil)),
node.MockHost(tu.mn),
node.Test(),
node.Override(new(dtypes.Bootstrapper), dtypes.Bootstrapper(true)),
node.Override(new(modules.Genesis), modules.LoadGenesis(tu.genesis)),
)

View File

@ -29,7 +29,6 @@ import (
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/node/modules"
"github.com/filecoin-project/lotus/api/test"
"github.com/filecoin-project/lotus/chain/wallet"
@ -45,8 +44,6 @@ func init() {
abi.RegisteredSealProof_StackedDrg2KiBV1: {},
}
verifreg.MinVerifiedDealSize = big.NewInt(256)
modules.PubsubSubscribeImmediately = true
}
// TestPaymentChannels does a basic test to exercise the payment channel CLI

View File

@ -16,7 +16,6 @@ import (
logging "github.com/ipfs/go-log/v2"
"github.com/filecoin-project/lotus/api/test"
"github.com/filecoin-project/lotus/node/modules"
)
func init() {
@ -27,8 +26,6 @@ func init() {
abi.RegisteredSealProof_StackedDrg2KiBV1: {},
}
verifreg.MinVerifiedDealSize = big.NewInt(256)
modules.PubsubSubscribeImmediately = true
}
func TestAPI(t *testing.T) {

View File

@ -31,6 +31,7 @@ import (
miner2 "github.com/filecoin-project/lotus/miner"
"github.com/filecoin-project/lotus/node"
"github.com/filecoin-project/lotus/node/modules"
"github.com/filecoin-project/lotus/node/modules/dtypes"
testing2 "github.com/filecoin-project/lotus/node/modules/testing"
"github.com/filecoin-project/lotus/node/repo"
"github.com/filecoin-project/lotus/storage/mockstorage"
@ -370,6 +371,8 @@ func MockSbBuilder(t *testing.T, nFull int, storage []test.StorageMiner) ([]test
node.Override(new(ffiwrapper.Verifier), mock.MockVerifier),
node.Override(new(dtypes.Bootstrapper), dtypes.Bootstrapper(true)),
genesis,
)
if err != nil {