test

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: Apache-2.0, MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 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