Documentation ¶
Index ¶
- func AddRandomFile(t require.TestingT, r *rand.Rand, ipfs *httpapi.HttpApi) (cid.Cid, []byte)
- func AddRandomFileSize(t require.TestingT, r *rand.Rand, ipfs *httpapi.HttpApi, size int) (cid.Cid, []byte)
- func CreateIPFS(t tests.TestingTWithCleanup) (*httpapi.HttpApi, string)
- func NewAPI(t tests.TestingTWithCleanup, numMiners int) (*httpapi.HttpApi, *apistruct.FullNodeStruct, *api.API, func())
- func NewCustomFFSManager(t require.TestingT, ds datastore.TxnDatastore, cb lotus.ClientBuilder, ...) (*manager.Manager, func())
- func NewDevnet(t tests.TestingTWithCleanup, numMiners int, ipfsAddr string) (address.Address, lotus.ClientBuilder, ffs.MinerSelector)
- func NewFFSManager(t require.TestingT, ds datastore.TxnDatastore, ...) (*manager.Manager, func())
- func RandomBytes(r *rand.Rand, size int) []byte
- func RequireEventualJobState(t require.TestingT, fapi *api.API, jid ffs.JobID, status ffs.JobStatus) ffs.StorageJob
- func RequireFilStored(ctx context.Context, t require.TestingT, client *apistruct.FullNodeStruct, ...)
- func RequireFilUnstored(ctx context.Context, t require.TestingT, client *apistruct.FullNodeStruct, ...)
- func RequireIpfsPinnedCid(ctx context.Context, t require.TestingT, cid cid.Cid, ipfsAPI *httpapi.HttpApi)
- func RequireIpfsUnpinnedCid(ctx context.Context, t require.TestingT, cid cid.Cid, ipfsAPI *httpapi.HttpApi)
- func RequireRetrievalDealRecord(t require.TestingT, fapi *api.API, c cid.Cid)
- func RequireStorageConfig(t require.TestingT, fapi *api.API, c cid.Cid, config *ffs.StorageConfig)
- func RequireStorageDealRecord(t require.TestingT, fapi *api.API, c cid.Cid)
- func RequireStorageJobState(t require.TestingT, fapi *api.API, jid ffs.JobID, statuses ...ffs.JobStatus) ffs.StorageJob
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddRandomFile ¶
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 ¶
func CreateIPFS(t tests.TestingTWithCleanup) (*httpapi.HttpApi, string)
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 NewCustomFFSManager ¶ added in v0.7.2
func NewCustomFFSManager(t require.TestingT, ds datastore.TxnDatastore, cb lotus.ClientBuilder, masterAddr address.Address, ms ffs.MinerSelector, ipfsClient *httpapi.HttpApi, minimumPieceSize uint64) (*manager.Manager, func())
NewCustomFFSManager returns a new customized FFS manager.
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 ¶
RandomBytes returns a slice of random bytes of a desired size.
func RequireEventualJobState ¶ added in v0.6.0
func RequireEventualJobState(t require.TestingT, fapi *api.API, jid ffs.JobID, status ffs.JobStatus) ffs.StorageJob
RequireEventualJobState watches a Job for a desired status.
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 RequireRetrievalDealRecord ¶
RequireRetrievalDealRecord checks that a retrieval deal record exits for a cid.
func RequireStorageConfig ¶
RequireStorageConfig compares a cid storage config against a target.
func RequireStorageDealRecord ¶
RequireStorageDealRecord checks that a storage deal record exist for a cid.
Types ¶
This section is empty.