helpers

package
v0.0.0-...-8c81597 Latest Latest
Warning

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

Go to latest
Published: May 17, 2025 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CounterCmp

func CounterCmp(t *testing.T, metrics map[string]*dto.MetricFamily, value float64, name string, params ...string)

func CreateRandomPeers

func CreateRandomPeers(t *testing.T, count int) []bls.Peer

func CreateTracerProvider

func CreateTracerProvider(t *testing.T, resource *resource.Resource) (*tracetest.InMemoryExporter, *trace.TracerProvider)

func GenerateTestAddrs

func GenerateTestAddrs(t *testing.T, n int) []ma.Multiaddr

func GetMetric

func GetMetric(m map[string]*dto.MetricFamily, name string, params ...string) ([]*dto.Metric, error)

func HostAddNewPeer

func HostAddNewPeer(t *testing.T, host *host.Host, newPeer *host.Host)

func HostGetAddrInfo

func HostGetAddrInfo(t *testing.T, host *host.Host) *peer.AddrInfo

func InMemoryDB

func InMemoryDB(t *testing.T) *pebble.DB

func MetricMap

func MetricMap(t *testing.T, g prometheus.Gatherer) map[string]*dto.MetricFamily

func NewLoopbackHost

func NewLoopbackHost(t *testing.T, log zerolog.Logger) *host.Host

func RandPeerID

func RandPeerID(t *testing.T) peer.ID

Types

type FunctionServer

type FunctionServer struct {
	*httptest.Server
}

func CreateFunctionServer

func CreateFunctionServer(t *testing.T, manifestEndpoint string, manifest bls.FunctionManifest, deploymentEndpoint string, archivePath string, cid string) *FunctionServer

Jump to

Keyboard shortcuts

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