Documentation ¶
Index ¶
- Constants
- Variables
- func CreateClientFile(ctx context.Context, client api.FullNode, rseed int) (*api.ImportRes, []byte, error)
- func MakeDeal(t *testing.T, ctx context.Context, rseed int, client api.FullNode, ...)
- func MineUntilBlock(ctx context.Context, t *testing.T, fn TestNode, sn TestStorageNode, ...)
- func SendFunds(ctx context.Context, t *testing.T, sender TestNode, addr address.Address, ...)
- func TestApis(t *testing.T, b APIBuilder)
- func TestDealFlow(t *testing.T, b APIBuilder, blocktime time.Duration, carExport, fastRet bool, ...)
- func TestDealMining(t *testing.T, b APIBuilder, blocktime time.Duration, carExport bool)
- func TestDoubleDealFlow(t *testing.T, b APIBuilder, blocktime time.Duration, startEpoch abi.ChainEpoch)
- func TestFastRetrievalDealFlow(t *testing.T, b APIBuilder, blocktime time.Duration, startEpoch abi.ChainEpoch)
- func TestPaymentChannels(t *testing.T, b APIBuilder, blocktime time.Duration)
- func TestPledgeSector(t *testing.T, b APIBuilder, blocktime time.Duration, nSectors int)
- func TestPublishDealsBatching(t *testing.T, b APIBuilder, blocktime time.Duration, startEpoch abi.ChainEpoch)
- func TestSecondDealRetrieval(t *testing.T, b APIBuilder, blocktime time.Duration)
- func TestTerminate(t *testing.T, b APIBuilder, blocktime time.Duration)
- func TestWindowPost(t *testing.T, b APIBuilder, blocktime time.Duration, nSectors int)
- func TestWindowPostDispute(t *testing.T, b APIBuilder, blocktime time.Duration)
- func TestWindowPostDisputeFails(t *testing.T, b APIBuilder, blocktime time.Duration)
- func TestZeroPricePerByteRetrievalDealFlow(t *testing.T, b APIBuilder, blocktime time.Duration, startEpoch abi.ChainEpoch)
- type APIBuilder
- type BlockMiner
- type FullNodeOpts
- type OptionGenerator
- type StorageMiner
- type TestNode
- type TestStorageNode
Constants ¶
View Source
const GenesisPreseals = 2
Variables ¶
View Source
var FullNodeWithActorsV3At = func(upgradeHeight abi.ChainEpoch) FullNodeOpts { return FullNodeOpts{ Opts: func(nodes []TestNode) node.Option { return node.Override(new(stmgr.UpgradeSchedule), stmgr.UpgradeSchedule{}) }, } }
View Source
var MineNext = miner.MineReq{ InjectNulls: 0, Done: func(bool, abi.ChainEpoch, error) {}, }
View Source
var OneFull = DefaultFullOpts(1)
View Source
var OneMiner = []StorageMiner{{Full: 0, Preseal: PresealGenesis}}
View Source
var PresealGenesis = -1
View Source
var TwoFull = DefaultFullOpts(2)
Functions ¶
func CreateClientFile ¶
func MineUntilBlock ¶
func MineUntilBlock(ctx context.Context, t *testing.T, fn TestNode, sn TestStorageNode, cb func(abi.ChainEpoch))
func TestApis ¶
func TestApis(t *testing.T, b APIBuilder)
TestApis is the entry point to API test suite
func TestDealFlow ¶
func TestDealFlow(t *testing.T, b APIBuilder, blocktime time.Duration, carExport, fastRet bool, startEpoch abi.ChainEpoch)
func TestDealMining ¶
func TestDoubleDealFlow ¶
func TestDoubleDealFlow(t *testing.T, b APIBuilder, blocktime time.Duration, startEpoch abi.ChainEpoch)
func TestFastRetrievalDealFlow ¶
func TestFastRetrievalDealFlow(t *testing.T, b APIBuilder, blocktime time.Duration, startEpoch abi.ChainEpoch)
func TestPaymentChannels ¶
func TestPaymentChannels(t *testing.T, b APIBuilder, blocktime time.Duration)
func TestPledgeSector ¶
func TestPublishDealsBatching ¶
func TestPublishDealsBatching(t *testing.T, b APIBuilder, blocktime time.Duration, startEpoch abi.ChainEpoch)
func TestSecondDealRetrieval ¶
func TestSecondDealRetrieval(t *testing.T, b APIBuilder, blocktime time.Duration)
func TestTerminate ¶
func TestTerminate(t *testing.T, b APIBuilder, blocktime time.Duration)
func TestWindowPost ¶
func TestWindowPostDispute ¶
func TestWindowPostDispute(t *testing.T, b APIBuilder, blocktime time.Duration)
func TestWindowPostDisputeFails ¶
func TestWindowPostDisputeFails(t *testing.T, b APIBuilder, blocktime time.Duration)
func TestZeroPricePerByteRetrievalDealFlow ¶
func TestZeroPricePerByteRetrievalDealFlow(t *testing.T, b APIBuilder, blocktime time.Duration, startEpoch abi.ChainEpoch)
Types ¶
type APIBuilder ¶
type APIBuilder func(t *testing.T, full []FullNodeOpts, storage []StorageMiner) ([]TestNode, []TestStorageNode)
APIBuilder is a function which is invoked in test suite to provide test nodes and networks
fullOpts array defines options for each full node storage array defines storage nodes, numbers in the array specify full node index the storage node 'belongs' to
type BlockMiner ¶
type BlockMiner struct {
// contains filtered or unexported fields
}
func NewBlockMiner ¶
func NewBlockMiner(ctx context.Context, t *testing.T, miner TestStorageNode, blocktime time.Duration) *BlockMiner
func (*BlockMiner) MineBlocks ¶
func (bm *BlockMiner) MineBlocks()
func (*BlockMiner) Stop ¶
func (bm *BlockMiner) Stop()
type FullNodeOpts ¶
type FullNodeOpts struct { Lite bool // run node in "lite" mode Opts OptionGenerator // generate dependency injection options }
Options for setting up a mock full node
func DefaultFullOpts ¶
func DefaultFullOpts(nFull int) []FullNodeOpts
type OptionGenerator ¶
type StorageMiner ¶
Options for setting up a mock storage miner
Click to show internal directories.
Click to hide internal directories.