Documentation ¶
Index ¶
- func AddRequestWithFormParamsToCtx(ctx *gin.Context, method string, params map[string]string)
- func AddUrlParamsToCtx(ctx *gin.Context, params map[string]string)
- func ConnectToIntegrationTestDB(t *testing.T) *mongo.Database
- func SetEnvVars(vars map[string]string) (restoreVars func())
- func UnmarshallResponse(res *bytes.Buffer, out interface{}) error
- func UnsetVars(vars ...string) (restoreVars func())
- type RouterGroupMatcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddRequestWithFormParamsToCtx ¶
AddRequestWithFormParamsToCtx attaches a request with given method and form params to the context
func AddUrlParamsToCtx ¶
AddUrlParamsToCtx attaches a request with given method and url params to the context
func ConnectToIntegrationTestDB ¶
ConnectToIntegrationTestDB waits for the integrations tests DB to become available and returns a connection to the DB
func SetEnvVars ¶
SetEnvVars sets given environment variables and provides a callback function to restore the variables to their initial values
func UnmarshallResponse ¶
UnmarshallResponse unmarshalls the reponse in res and stores it in out
Types ¶
type RouterGroupMatcher ¶
type RouterGroupMatcher struct { // Path is the base path of the router groups to match Path string }
RouterGroupMatcher matches gin router groups with given path
func (RouterGroupMatcher) Matches ¶
func (r RouterGroupMatcher) Matches(x interface{}) bool
Matches implements the gomock.Matcher interface
func (RouterGroupMatcher) String ¶
func (r RouterGroupMatcher) String() string
Click to show internal directories.
Click to hide internal directories.