testutils

package
v0.0.0-...-2788592 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LeakCheck

func LeakCheck(t testing.TB)

LeakCheck is a no-op when address sanitizer is not enabled.

Types

type TestConn

type TestConn struct {
	net.Conn
	// contains filtered or unexported fields
}

TestConn wraps net.Conn to trace connection events

func (*TestConn) Close

func (c *TestConn) Close() error

func (*TestConn) Read

func (c *TestConn) Read(b []byte) (n int, err error)

func (*TestConn) Write

func (c *TestConn) Write(b []byte) (n int, err error)

type TestListener

type TestListener struct {
	net.Listener
	// contains filtered or unexported fields
}

TestListener wraps net.Listener to trace accept events

func (*TestListener) Accept

func (l *TestListener) Accept() (net.Conn, error)

type TestServer

type TestServer struct {
	*httptest.Server
	URL    string
	CaFile string
	// contains filtered or unexported fields
}

TestServer is a test HTTPS server with tracing.

func NewServer

func NewServer(t testing.TB, trace bool) *TestServer

NewServer creates a new test HTTPS server with tracing.

Directories

Path Synopsis
internal/testutils/proto/gen.go
internal/testutils/proto/gen.go

Jump to

Keyboard shortcuts

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