test

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: Apache-2.0, MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MkBlockedLinkSystem added in v0.4.0

func MkBlockedLinkSystem(ds datastore.Batching) (ipld.LinkSystem, <-chan chan<- struct{})

func MkChain

func MkChain(lsys ipld.LinkSystem, full bool) []ipld.Link

Return the chain with all nodes or just half of it for testing

func MkLinkSystem

func MkLinkSystem(ds datastore.Batching) ipld.LinkSystem

func MkTestHost

func MkTestHost(t *testing.T, options ...libp2p.Option) host.Host

func MkTestHostPK added in v0.5.0

func MkTestHostPK(t *testing.T) (host.Host, crypto.PrivKey)

func RandomCids

func RandomCids(n int) []cid.Cid

func Store

func Store(srcStore datastore.Batching, n ipld.Node) (ipld.Link, error)

func WaitForHttpPublisher

func WaitForHttpPublisher(publisher TestPublisher) error

func WaitForMeshWithMessage

func WaitForMeshWithMessage(t *testing.T, topic string, hosts ...host.Host) []*pubsub.Topic

func WaitForP2PPublisher

func WaitForP2PPublisher(publisher TestPublisher, clientHost host.Host, topic string) error

Types

type TestPublisher

type TestPublisher interface {
	// Addrs returns the addresses that the publisher is listening on.
	Addrs() []multiaddr.Multiaddr
	// ID returns the peer ID associated with the publisher.
	ID() peer.ID
}

Jump to

Keyboard shortcuts

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