test

package
v0.29.4 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddressProducer

func AddressProducer(ctx context.Context, b *testing.B, addrs chan *peerpair, addrsPerPeer int)

func AssertAddressesEqual

func AssertAddressesEqual(t *testing.T, exp, act []ma.Multiaddr)

func BenchmarkKeyBook

func BenchmarkKeyBook(b *testing.B, factory KeyBookFactory)

func BenchmarkPeerstore

func BenchmarkPeerstore(b *testing.B, factory PeerstoreFactory, variant string)

func GenerateAddrs

func GenerateAddrs(count int) []ma.Multiaddr

func GeneratePeerIDs

func GeneratePeerIDs(count int) []peer.ID

func Multiaddr

func Multiaddr(m string) ma.Multiaddr

func RandomPeer

func RandomPeer(b *testing.B, addrCount int) *peerpair

func TestAddrBook

func TestAddrBook(t *testing.T, factory AddrBookFactory, clk *mockClock.Mock)

func TestKeyBook

func TestKeyBook(t *testing.T, factory KeyBookFactory)

func TestPeerstore

func TestPeerstore(t *testing.T, factory PeerstoreFactory)

func TestPeerstoreProtoStoreLimits

func TestPeerstoreProtoStoreLimits(t *testing.T, ps pstore.Peerstore, limit int)

Types

type AddrBookFactory

type AddrBookFactory func() (pstore.AddrBook, func())

type KeyBookFactory

type KeyBookFactory func() (pstore.KeyBook, func())

type PeerstoreFactory

type PeerstoreFactory func() (pstore.Peerstore, func())

Jump to

Keyboard shortcuts

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