test

package
v0.6.2-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2020 License: Apache-2.0, MIT Imports: 39 Imported by: 0

Documentation

Index

Constants

View Source
const GenesisPreseals = 2

Variables

View Source
var MineNext = miner.MineReq{
	InjectNulls: 0,
	Done:        func(bool, abi.ChainEpoch, error) {},
}
View Source
var OneMiner = []StorageMiner{{Full: 0, Preseal: PresealGenesis}}
View Source
var PresealGenesis = -1

Functions

func MineUntilBlock added in v0.5.5

func MineUntilBlock(ctx context.Context, t *testing.T, fn TestNode, sn TestStorageNode, cb func(abi.ChainEpoch))

func SendFunds added in v0.5.0

func SendFunds(ctx context.Context, t *testing.T, sender TestNode, addr address.Address, amount abi.TokenAmount)

func TestApis

func TestApis(t *testing.T, b APIBuilder)

TestApis is the entry point to API test suite

func TestCCUpgrade added in v0.5.0

func TestCCUpgrade(t *testing.T, b APIBuilder, blocktime time.Duration)

func TestDealFlow

func TestDealFlow(t *testing.T, b APIBuilder, blocktime time.Duration, carExport, fastRet bool)

func TestDealMining added in v0.3.0

func TestDealMining(t *testing.T, b APIBuilder, blocktime time.Duration, carExport bool)

func TestDoubleDealFlow added in v0.3.0

func TestDoubleDealFlow(t *testing.T, b APIBuilder, blocktime time.Duration)

func TestFastRetrievalDealFlow added in v0.5.0

func TestFastRetrievalDealFlow(t *testing.T, b APIBuilder, blocktime time.Duration)

func TestPaymentChannels added in v0.5.0

func TestPaymentChannels(t *testing.T, b APIBuilder, blocktime time.Duration)

func TestPledgeSector added in v0.3.1

func TestPledgeSector(t *testing.T, b APIBuilder, blocktime time.Duration, nSectors int)

func TestSenondDealRetrieval added in v0.5.0

func TestSenondDealRetrieval(t *testing.T, b APIBuilder, blocktime time.Duration)

func TestWindowPost added in v0.3.1

func TestWindowPost(t *testing.T, b APIBuilder, blocktime time.Duration, nSectors int)

Types

type APIBuilder

type APIBuilder func(t *testing.T, nFull int, storage []StorageMiner) ([]TestNode, []TestStorageNode)

APIBuilder is a function which is invoked in test suite to provide test nodes and networks

storage array defines storage nodes, numbers in the array specify full node index the storage node 'belongs' to

type BlockMiner added in v0.5.0

type BlockMiner struct {
	// contains filtered or unexported fields
}

func NewBlockMiner added in v0.5.0

func NewBlockMiner(ctx context.Context, t *testing.T, miner TestStorageNode, blocktime time.Duration) *BlockMiner

func (*BlockMiner) MineBlocks added in v0.5.0

func (bm *BlockMiner) MineBlocks()

func (*BlockMiner) Stop added in v0.5.0

func (bm *BlockMiner) Stop()

type StorageMiner added in v0.3.0

type StorageMiner struct {
	Full    int
	Preseal int
}

type TestNode

type TestNode struct {
	api.FullNode
	// ListenAddr is the address on which an API server is listening, if an
	// API server is created for this Node
	ListenAddr multiaddr.Multiaddr
}

type TestStorageNode

type TestStorageNode struct {
	api.StorageMiner
	// ListenAddr is the address on which an API server is listening, if an
	// API server is created for this Node
	ListenAddr multiaddr.Multiaddr

	MineOne func(context.Context, miner.MineReq) error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL