Documentation
¶
Index ¶
- Constants
- Variables
- func BenchmarkSet(t testing.TB, bookCount, stepCount int, body string) (*httptest.Server, string)
- func BenchmarkSetWithOpenAPI3(t testing.TB, bookCount, stepCount int) (*httptest.Server, string)
- func CreateHTTPBinContainer(t *testing.T) string
- func CreateMySQLContainer(t *testing.T) (*sql.DB, string)
- func CreateSSHdContainer(t *testing.T) (*ssh.Client, string, string, string, int)
- func GRPCServer(t *testing.T, useTLS bool, disableReflection bool) *grpcstub.Server
- func HTTPSServer(t testing.TB) *httptest.Server
- func HTTPSServerAndRouter(t testing.TB) (*httptest.Server, *httpstub.Router)
- func HTTPServer(t testing.TB) *httptest.Server
- func HTTPServerAndRouter(t testing.TB) (*httptest.Server, *httpstub.Router)
- func NewNullSSHClient() *ssh.Client
- func NewPort(t testing.TB) int
- func Root() string
- func SQLite(t *testing.T) (*sql.DB, string)
- func SSHServer(t testing.TB) string
- func SkipCDPTest(t *testing.T) bool
- func Testdata() string
- type NullChannel
- func (*NullChannel) Close() error
- func (*NullChannel) CloseWrite() error
- func (*NullChannel) Read(data []byte) (int, error)
- func (*NullChannel) SendRequest(name string, wantReply bool, payload []byte) (bool, error)
- func (*NullChannel) Stderr() io.ReadWriter
- func (*NullChannel) Write(data []byte) (int, error)
- type NullConn
- func (*NullConn) ClientVersion() []byte
- func (*NullConn) Close() error
- func (*NullConn) LocalAddr() net.Addr
- func (*NullConn) OpenChannel(name string, data []byte) (ssh.Channel, <-chan *ssh.Request, error)
- func (*NullConn) RemoteAddr() net.Addr
- func (*NullConn) SendRequest(name string, wantReply bool, payload []byte) (bool, []byte, error)
- func (*NullConn) ServerVersion() []byte
- func (*NullConn) SessionID() []byte
- func (*NullConn) User() string
- func (*NullConn) Wait() error
- type NullReadWriter
Constants ¶
const ( HTTPBinHostname = "myhttpbin" MySQLHostname = "mydb" SSHdHostname = "mysshd" )
const MultipartBoundary = "123456789012345678901234567890abcdefghijklmnopqrstuvwxyz"
Variables ¶
var Cacert = func() []byte { b, err := os.ReadFile(filepath.Join(Testdata(), "cacert.pem")) if err != nil { panic(err) } return b }()
Functions ¶
func BenchmarkSet ¶ added in v0.93.0
BenchmarkSet returns a server and a path pattern for benchmarking.
func BenchmarkSetWithOpenAPI3 ¶ added in v0.103.2
BenchmarkSetWithOpenAPI3 returns a server and a path pattern for benchmarking.
func CreateHTTPBinContainer ¶ added in v0.52.0
func CreateMySQLContainer ¶ added in v0.52.0
func CreateSSHdContainer ¶ added in v0.52.0
func GRPCServer ¶
func HTTPSServer ¶ added in v0.57.2
HTTPSServer creates and returns an HTTPS test server with TLS and predefined routes. The server is automatically closed when the test completes.
func HTTPSServerAndRouter ¶ added in v0.57.2
HTTPSServerAndRouter creates and returns both an HTTPS test server with TLS and its router. This allows for additional route configuration after creation. The server is automatically closed when the test completes.
func HTTPServer ¶
HTTPServer creates and returns an HTTP test server with predefined routes. The server is automatically closed when the test completes.
func HTTPServerAndRouter ¶ added in v0.47.0
HTTPServerAndRouter creates and returns both an HTTP test server and its router. This allows for additional route configuration after creation. The server is automatically closed when the test completes.
func NewNullSSHClient ¶ added in v0.52.0
func SkipCDPTest ¶ added in v0.47.0
Types ¶
type NullChannel ¶ added in v0.52.0
type NullChannel struct{}
func (*NullChannel) Close ¶ added in v0.52.0
func (*NullChannel) Close() error
func (*NullChannel) CloseWrite ¶ added in v0.52.0
func (*NullChannel) CloseWrite() error
func (*NullChannel) SendRequest ¶ added in v0.52.0
func (*NullChannel) Stderr ¶ added in v0.52.0
func (*NullChannel) Stderr() io.ReadWriter
type NullConn ¶ added in v0.52.0
type NullConn struct{}
func (*NullConn) ClientVersion ¶ added in v0.52.0
func (*NullConn) OpenChannel ¶ added in v0.52.0
func (*NullConn) RemoteAddr ¶ added in v0.52.0
func (*NullConn) SendRequest ¶ added in v0.52.0
func (*NullConn) ServerVersion ¶ added in v0.52.0
type NullReadWriter ¶ added in v0.52.0
type NullReadWriter struct{}