tests

package
Version: v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestMiddleware added in v2.2.11

func TestMiddleware(ctx context.Context, method string, requestMod func(req *http.Request), routerMod func(gRouter gin.IRouter)) *httptest.ResponseRecorder

TestMiddleware is a helper to test a gin middleware routerMod allows you to modify route (i.e. install a middleware, attach a request handler) requestMod allows you to modify the request prior sending it returns a *httptest.ResponseRecorder for assertions

func WithEnvVars

func WithEnvVars(bc func(), envVars ...EnvDecl)

Types

type EnvDecl

type EnvDecl struct {
	Name  string
	Value string
}

Jump to

Keyboard shortcuts

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