swarmtest

package
v0.0.0-...-d4b7e32 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2023 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BenchSwarm

func BenchSwarm[A p2p.Addr](b *testing.B, sf func(testing.TB, []p2p.Swarm[A]))

func CloseAskSwarms

func CloseAskSwarms[A p2p.Addr](t testing.TB, xs []p2p.AskSwarm[A])

func CloseSecureSwarms

func CloseSecureSwarms[A p2p.Addr, Pub any](t testing.TB, xs []p2p.SecureSwarm[A, Pub])

func CloseSwarms

func CloseSwarms[A p2p.Addr](t testing.TB, xs []p2p.Swarm[A])

func TestAsk

func TestAsk[A p2p.Addr](t *testing.T, src, dst p2p.AskSwarm[A])

func TestAskAll

func TestAskAll[A p2p.Addr](t *testing.T, xs []p2p.AskSwarm[A])

func TestAskSwarm

func TestAskSwarm[A p2p.Addr](t *testing.T, newSwarms func(testing.TB, []p2p.AskSwarm[A]))

TestAskSwarm runs a test suite on AskSwarms to ensure they implement p2p.AskSwarm correctly

func TestErrorResponse

func TestErrorResponse[A p2p.Addr](t *testing.T, src, dst p2p.AskSwarm[A])

func TestHasUDP

func TestHasUDP(t *testing.T, newAddr func() p2p.Addr)

func TestLocalAddrs

func TestLocalAddrs[A p2p.Addr](t *testing.T, s p2p.Swarm[A])

func TestMarshalParse

func TestMarshalParse[A p2p.Addr](t *testing.T, s p2p.Swarm[A])

func TestMultipleAsks

func TestMultipleAsks[A p2p.Addr](t *testing.T, xs []p2p.AskSwarm[A])

func TestSecureSwarm

func TestSecureSwarm[A p2p.Addr, Pub any](t *testing.T, newSwarms func(testing.TB, []p2p.SecureSwarm[A, Pub]))

func TestSwarm

func TestSwarm[A p2p.Addr](t *testing.T, newSwarms func(testing.TB, []p2p.Swarm[A]))

TestSwarm runs a suite of tests to ensure a Swarm exhibits the correct behaviors newSwarms should fill the passed slice with swarms which can communicate with one another, and register any cleanup on the provided testing.TB

func TestTell

func TestTell[A p2p.Addr](t *testing.T, src, dst p2p.Swarm[A])

func TestTellAllPairs

func TestTellAllPairs[A p2p.Addr](t *testing.T, xs []p2p.Swarm[A])

func TestTellBidirectional

func TestTellBidirectional[A p2p.Addr](t *testing.T, a, b p2p.Swarm[A])

func TestTellMTU

func TestTellMTU[A p2p.Addr](t *testing.T, a, b p2p.Swarm[A])

Types

This section is empty.

Jump to

Keyboard shortcuts

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