# Functions
AllSelector just returns a new instance of a "whole dag selector".
AssertEqualSelector asserts two requests have the same valid selector.
AssertEqualTestVoucher asserts that two requests have the same fake data transfer voucher.
AssertEqualTestVoucherResult asserts that two responses have the same fake data transfer voucher result.
AssertTestVoucher asserts that a data transfer requests contains the expected fake data transfer voucher type.
AssertTestVoucherResult asserts that a data transfer response contains the expected fake data transfer voucher result type.
AttributeValueInTraceSpan is a test helper that asserts that at a span contains an attribute with the name provided, and returns the value of that attribute for further inspection.
ContainsBlock returns true if a block is found n a list of blocks.
ContainsPeer returns true if a peer is found n a list of peers.
EventAsException is a test helper that converts a trace event to an ExceptionEvent for easier inspection.
EventInTraceSpan is a test helper that asserts that at a span contains an event with the name provided, and returns the value of that event for further inspection.
GenerateBlocksOfSize generates a series of blocks of the given byte size.
GenerateCids produces n content identifiers.
GeneratePeers creates n peer ids.
IndexOf returns the index of a given cid in an array of blocks.
NewDTRequest makes a new DT Request message.
NewDTResponse makes a new DT Request message.
NewFakeNetwork returns a new fake data transfer network instance.
NewFakeTransport returns a new instance of FakeTransport.
No description provided by the author
NewStubbedValidator returns a new instance of a stubbed validator.
No description provided by the author
No description provided by the author
NewTestVoucher returns a fake voucher with random data.
NewTestVoucher returns a fake voucher with random data.
RandomBytes returns a byte array of the given size with random values.
No description provided by the author
No description provided by the author
SetupTracing returns a test helper that can will collect all spans within a Collector.
StartAndWaitForReady is a utility function to start a module and verify it reaches the ready state.
# Constants
No description provided by the author
# Structs
Collector can be used as a trace batcher to provide traces to, we collect individual spans and then extract useful data out of them for test assertions.
ExceptionEvent is a simplistic string form representation of an event.
FakeNetwork is a network that satisfies the DataTransferNetwork interface but does not actually do anything.
FakeSentMessage is a recording of a message sent on the FakeNetwork.
FakeTransport is a fake transport with mocked results.
No description provided by the author
No description provided by the author
OpenedChannel records a call to open a channel.
ReceivedRestartValidation records a call to ValidateRestart.
ReceivedValidation records a call to either ValidatePush or ValidatePull.
ResumedChannel records a call to resume a channel.
StubbedValidator is a validator that returns predictable results.