test

package
v0.5.15 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 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(options ...libp2p.Option) host.Host

func RandomCids

func RandomCids(n int) ([]cid.Cid, error)

func Store

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

func WaitForHttpPublisher added in v0.5.14

func WaitForHttpPublisher(publisher TestPublisher) error

func WaitForMeshWithMessage

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

func WaitForP2PPublisher added in v0.5.14

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

Types

type TestPublisher added in v0.5.14

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