testing

package
v1.9.5 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: Apache-2.0 Imports: 6 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextWithMockTag added in v1.7.10

func ContextWithMockTag(parent context.Context) context.Context

func IsMock added in v1.7.10

func IsMock(c context.Context) bool

func NewRequestAndResponse added in v1.5.0

func NewRequestAndResponse(method, path string) (engine.Request, engine.Response)

func NewStdRequest added in v1.5.0

func NewStdRequest(method, path string) *http.Request

func NewStdResponse added in v1.5.0

func NewStdResponse() http.ResponseWriter

func Request

func Request(method, path string, handler engine.Handler, reqRewrite ...func(*http.Request)) *httptest.ResponseRecorder

Request testing

func WrapRequest added in v1.5.0

func WrapRequest(req *http.Request) engine.Request

func WrapResponse added in v1.5.0

func WrapResponse(req *http.Request, rw http.ResponseWriter) engine.Response

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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