integrationtest

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2020 License: MIT Imports: 16 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 RandomBytes

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

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

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.

func RequireStorageJobState added in v0.6.0

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

RequireStorageJobState checks if the current status of a job matches one of the specified statuses.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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