Documentation ¶
Index ¶
- func CollectErrors(ctx context.Context, t *testing.T, errChan <-chan error) []error
- func CollectResponses(ctx context.Context, t *testing.T, ...) []graphsync.ResponseProgress
- func ContainsBlock(blks []blocks.Block, block blocks.Block) bool
- func ContainsPeer(peers []peer.ID, p peer.ID) bool
- func GenerateBlocksOfSize(n int, size int64) []blocks.Block
- func GenerateCids(n int) []cid.Cid
- func GeneratePeers(n int) []peer.ID
- func IndexOf(blks []blocks.Block, c cid.Cid) int
- func RandomBytes(n int64) []byte
- func ReadNResponses(ctx context.Context, t *testing.T, ...) []graphsync.ResponseProgress
- func VerifyEmptyErrors(ctx context.Context, t *testing.T, errChan <-chan error)
- func VerifyEmptyResponse(ctx context.Context, t *testing.T, ...)
- func VerifySingleTerminalError(ctx context.Context, t *testing.T, errChan <-chan error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CollectErrors ¶
CollectErrors is just a utility to convert an error channel into an array.
func CollectResponses ¶
func CollectResponses(ctx context.Context, t *testing.T, responseChan <-chan graphsync.ResponseProgress) []graphsync.ResponseProgress
CollectResponses is just a utility to convert a graphsync response progress channel into an array.
func ContainsBlock ¶
ContainsBlock returns true if a block is found n a list of blocks
func ContainsPeer ¶
ContainsPeer returns true if a peer is found n a list of peers.
func GenerateBlocksOfSize ¶
GenerateBlocksOfSize generates a series of blocks of the given byte size
func RandomBytes ¶
RandomBytes returns a byte array of the given size with random values.
func ReadNResponses ¶
func ReadNResponses(ctx context.Context, t *testing.T, responseChan <-chan graphsync.ResponseProgress, count int) []graphsync.ResponseProgress
ReadNResponses does a partial read from a ResponseProgress channel -- up to n values
func VerifyEmptyErrors ¶
VerifyEmptyErrors verifies that no errors were sent over a channel before it was closed
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.