integrationtest

package
v0.6.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2020 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRandomFile

func AddRandomFile(t require.TestingT, r *rand.Rand, ipfs *httpapi.HttpApi) (cid.Cid, []byte)

AddRandomFile adds a random file to the IPFS node.

func AddRandomFileSize

func AddRandomFileSize(t require.TestingT, r *rand.Rand, ipfs *httpapi.HttpApi, size int) (cid.Cid, []byte)

AddRandomFileSize adds a random file with a specified size to the IPFS node.

func CreateIPFS

CreateIPFS creates a docker container running IPFS.

func NewAPI

func NewAPI(t tests.TestingTWithCleanup, numMiners int) (*httpapi.HttpApi, *apistruct.FullNodeStruct, *api.API, func())

NewAPI returns a new set of components for FFS.

func NewDevnet

func NewDevnet(t tests.TestingTWithCleanup, numMiners int, ipfsAddr string) (address.Address, lotus.ClientBuilder, ffs.MinerSelector)

NewDevnet creates a localnet.

func NewFFSManager

func NewFFSManager(t require.TestingT, ds datastore.TxnDatastore, clientBuilder lotus.ClientBuilder, masterAddr address.Address, ms ffs.MinerSelector, ipfsClient *httpapi.HttpApi) (*manager.Manager, func())

NewFFSManager returns a new FFS manager.

func RandomBytes

func RandomBytes(r *rand.Rand, size int) []byte

RandomBytes returns a slice of random bytes of a desired size.

func RequireFilStored

func RequireFilStored(ctx context.Context, t require.TestingT, client *apistruct.FullNodeStruct, c cid.Cid)

RequireFilStored cehcks that a cid is stored in the Filecoin network.

func RequireFilUnstored

func RequireFilUnstored(ctx context.Context, t require.TestingT, client *apistruct.FullNodeStruct, c cid.Cid)

RequireFilUnstored checks that a cid is not stored in the Filecoin network.

func RequireIpfsPinnedCid

func RequireIpfsPinnedCid(ctx context.Context, t require.TestingT, cid cid.Cid, ipfsAPI *httpapi.HttpApi)

RequireIpfsPinnedCid checks that a cid is pinned in the IPFS node.

func RequireIpfsUnpinnedCid

func RequireIpfsUnpinnedCid(ctx context.Context, t require.TestingT, cid cid.Cid, ipfsAPI *httpapi.HttpApi)

RequireIpfsUnpinnedCid checks that a cid is unpinned in the IPFS node.

func RequireJobState

func RequireJobState(t require.TestingT, fapi *api.API, jid ffs.JobID, status ffs.JobStatus) ffs.StorageJob

RequireJobState watches a Job for a desired status.

func RequireRetrievalDealRecord

func RequireRetrievalDealRecord(t require.TestingT, fapi *api.API, c cid.Cid)

RequireRetrievalDealRecord checks that a retrieval deal record exits for a cid.

func RequireStorageConfig

func RequireStorageConfig(t require.TestingT, fapi *api.API, c cid.Cid, config *ffs.StorageConfig)

RequireStorageConfig compares a cid storage config against a target.

func RequireStorageDealRecord

func RequireStorageDealRecord(t require.TestingT, fapi *api.API, c cid.Cid)

RequireStorageDealRecord checks that a storage deal record exist for a cid.

Types

This section is empty.

Jump to

Keyboard shortcuts

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