Documentation ¶
Index ¶
- func ContextWithTimeout(t *testing.T) context.Context
- func CopyDir(t *testing.T, src string, dst string)
- func CopyFile(t *testing.T, src, dst string)
- func GenerateKeysAndIdentity(t *testing.T) (crypto.PrivKey, crypto.PubKey, peer.ID)
- func GetBstoreLen(ctx context.Context, t *testing.T, bs RoBlockstore) int
- func MultiAddsToString(addrs []multiaddr.Multiaddr) []string
- func NewID(t *testing.T) peer.ID
- func OpenSampleCar(t *testing.T, carFileName string) *blockstore.ReadOnly
- func RandomCids(t testing.TB, rng *rand.Rand, n int) []cid.Cid
- func RandomMultihashes(t testing.TB, rng *rand.Rand, n int) []multihash.Multihash
- func SetupDataTransferOnHost(t *testing.T, h host.Host, store datastore.Batching, lsys ipld.LinkSystem) datatransfer.Manager
- func ThisDir(t *testing.T) string
- func WaitForAddrs(h host.Host) peer.AddrInfo
- type RoBlockstore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateKeysAndIdentity ¶ added in v0.9.1
func GetBstoreLen ¶
GetBstoreLen gets the total CID cound in a blockstore
func MultiAddsToString ¶ added in v0.9.1
func MultiAddsToString(addrs []multiaddr.Multiaddr) []string
func OpenSampleCar ¶
func OpenSampleCar(t *testing.T, carFileName string) *blockstore.ReadOnly
OpenSampleCar opens a car file in the testdata directory to a blockstore
func RandomMultihashes ¶ added in v0.2.0
func SetupDataTransferOnHost ¶
func SetupDataTransferOnHost(t *testing.T, h host.Host, store datastore.Batching, lsys ipld.LinkSystem) datatransfer.Manager
SetupDataTransferOnHost generates a data transfer instance for the given libp2p host
Types ¶
type RoBlockstore ¶
RoBlockstore is just the needed interface for GetBstoreLen
Click to show internal directories.
Click to hide internal directories.