Versions in this module Expand all Collapse all v0 v0.15.1 Aug 16, 2024 v0.15.0 Jul 8, 2024 v0.14.0 Apr 24, 2024 v0.13.0 Feb 27, 2024 Changes in this version + const DefaultContextPath + func CurrentContextPath(ctx context.Context) string + func CurrentPort(ctx context.Context) int + func GinContextRecorder(gc *gin.Context) *httptest.ResponseRecorder + func NewGinContext(ctx context.Context, method, path string, body io.Reader, ...) *gin.Context + func NewGinContextWithRequest(req *http.Request) *gin.Context + func NewRequest(ctx context.Context, method, target string, body io.Reader, ...) (req *http.Request) + func WithMockedServer(opts ...TestServerOptions) test.Options + func WithRealServer(opts ...TestServerOptions) test.Options + func WithUtilities(opts ...TestServerOptions) test.Options + type ExecResult struct + Response *http.Response + ResponseRecorder *httptest.ResponseRecorder + func Exec(ctx context.Context, req *http.Request, opts ...RequestOptions) (ExecResult, error) + func MustExec(ctx context.Context, req *http.Request, opts ...RequestOptions) ExecResult + type RequestOptions func(req *http.Request) + func ContentType(v string) RequestOptions + func Cookies(resp *http.Response) RequestOptions + func Headers(kvs ...string) RequestOptions + func Queries(kvs ...string) RequestOptions + type TestServerConfig struct + ContextPath string + LogLevel log.LoggingLevel + Port int + RequestOptions []RequestOptions + type TestServerOptions func(conf *TestServerConfig) + func AddDefaultRequestOptions(opts ...RequestOptions) TestServerOptions + func UseContextPath(contextPath string) TestServerOptions + func UseLogLevel(lvl log.LoggingLevel) TestServerOptions + func UsePort(port int) TestServerOptions