testing

package
v0.0.0-...-9b84f9e Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(t *testing.T, n1 *wakunode.WakuNode, n2 *wakunode.WakuNode, protocols ...protocol.ID)

func ConnectWithAddr

func ConnectWithAddr(t *testing.T, n *wakunode.WakuNode, addr string)

func Disconnect

func Disconnect(t *testing.T, n1 *wakunode.WakuNode, n2 *wakunode.WakuNode)

func ExpectNoPeers

func ExpectNoPeers(t *testing.T, n *wakunode.WakuNode)

func ExpectPeers

func ExpectPeers(t *testing.T, n *wakunode.WakuNode, expected ...peer.ID)

func NewAuthzDB

func NewAuthzDB(t testing.TB) (*bun.DB, string, func())

func NewDB

func NewDB(t testing.TB) (*sql.DB, string, func())

func NewEnvelope

func NewEnvelope(contentTopic string, timestamp uint64, content string) *messagev1.Envelope

func NewLog

func NewLog(t testing.TB) *zap.Logger

func NewMLSDB

func NewMLSDB(t *testing.T) (*bun.DB, string, func())

func NewNode

func NewNode(t testing.TB, log *zap.Logger, opts ...wakunode.WakuNodeOption) (*wakunode.WakuNode, func())

func NewPGXDB

func NewPGXDB(t testing.TB) (*sql.DB, string, func())

func NewPeer

func NewPeer(t *testing.T) host.Host

func NewPrivateKey

func NewPrivateKey(t testing.TB) *ecdsa.PrivateKey

func Publish

func Publish(t *testing.T, n *wakunode.WakuNode, msg *pb.WakuMessage)

func RandomBytes

func RandomBytes(n int) []byte

func RandomString

func RandomString(n int) string

func RandomStringLower

func RandomStringLower(n int) string

func Subscribe

func Subscribe(t *testing.T, n *wakunode.WakuNode) <-chan *protocol.Envelope

func SubscribeExpect

func SubscribeExpect(t *testing.T, envC chan *protocol.Envelope, msgs []*pb.WakuMessage)

func SubscribeExpectNone

func SubscribeExpectNone(t *testing.T, envC chan *protocol.Envelope)

Types

This section is empty.

Jump to

Keyboard shortcuts

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