Documentation ¶
Index ¶
- func CamelToSnakeCase(camel string) string
- func ConfigureClients(ctx context.Context, bddCTX gobdd.Context) (context.Context, func())
- func ConfigureSteps(s *gobdd.Suite)
- func FinishSpanAfterStep(ctx gobdd.Context)
- func GetCleanup(ctx gobdd.Context) map[string]func()
- func GetClient(ctx gobdd.Context) reflect.Value
- func GetClientVersion(ctx gobdd.Context, version string) (reflect.Value, error)
- func GetCtx(ctx gobdd.Context) context.Context
- func GetData(ctx gobdd.Context) map[string]interface{}
- func GetIgnoredTags() []string
- func GetJSONResponse(ctx gobdd.Context) interface{}
- func GetRequestArguments(ctx gobdd.Context) []interface{}
- func GetRequestParameters(ctx gobdd.Context) map[string]interface{}
- func GetRequestsUndo(ctx gobdd.Context, version string, operationID string) (func([]reflect.Value) func(), error)
- func GetResponse(ctx gobdd.Context) []reflect.Value
- func GetResponseStatusCode(resp []reflect.Value) (int, error)
- func GetT(ctx gobdd.Context) *testing.T
- func GetVersion(ctx gobdd.Context) string
- func LoadRequestsUndo(file string) (map[string]UndoAction, error)
- func RunCleanup(ctx gobdd.Context)
- func SetAPI(ctx gobdd.Context, value interface{})
- func SetCleanup(ctx gobdd.Context, value map[string]func())
- func SetClient(ctx gobdd.Context, value interface{})
- func SetCtx(ctx context.Context, bddCTX gobdd.Context)
- func SetData(ctx gobdd.Context, value map[string]interface{})
- func SetFixtureData(ctx gobdd.Context)
- func SetRequestsUndo(ctx gobdd.Context, value map[string]map[string]UndoAction)
- func SetVersion(ctx gobdd.Context, version string)
- func SnakeToCamelCase(snake string) (camel string)
- func StartSpanBeforeStep(ctx gobdd.Context)
- func Templated(t gobdd.StepTest, data map[string]interface{}, source string) string
- func ToVarName(param string) (varName string)
- type GivenStep
- type UndoAction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CamelToSnakeCase ¶
CamelToSnakeCase converts CamelCase to snake_case.
func ConfigureClients ¶
ConfigureClients sets up the Datadog API client for testing
func FinishSpanAfterStep ¶
FinishSpanAfterStep finishes the span and set error tags if needed.
func GetClientVersion ¶
GetClientVersion returns the client matching the given version
func GetJSONResponse ¶
GetJSONResponse returns request response.
func GetRequestArguments ¶
GetRequestArguments helps to build a request.
func GetRequestParameters ¶
GetRequestParameters helps to build a request.
func GetRequestsUndo ¶
func GetRequestsUndo(ctx gobdd.Context, version string, operationID string) (func([]reflect.Value) func(), error)
GetRequestsUndo gets map with undo function for each request.
func GetResponse ¶
GetResponse returns request response.
func GetResponseStatusCode ¶
GetResponseStatusCode returns request response status code.
func LoadRequestsUndo ¶
func LoadRequestsUndo(file string) (map[string]UndoAction, error)
LoadRequestsUndo load undo configuration.
func RunCleanup ¶
RunCleanup executes cleanup functions in controlled ordered based on registered keys.
func SetFixtureData ¶
SetFixtureData sets the fixture data in BDD context
func SetRequestsUndo ¶
func SetRequestsUndo(ctx gobdd.Context, value map[string]map[string]UndoAction)
SetRequestsUndo sets map with undo function for each request.
func SetVersion ¶
SetVersion sets package version.
func SnakeToCamelCase ¶
SnakeToCamelCase converts snake_case to SnakeCase.
func StartSpanBeforeStep ¶
StartSpanBeforeStep configures tags on a new span.
Types ¶
type GivenStep ¶
type GivenStep struct { Tag string `json:"tag"` Key string `json:"key"` Step string `json:"step"` OperationID string `json:"operationId"` Parameters []operationParameter `json:"parameters"` Source *string `json:"source"` }
GivenStep defines a step.
func LoadGivenSteps ¶
LoadGivenSteps load undo configuration.
type UndoAction ¶
type UndoAction struct { Tag string `json:"tag"` Undo *struct { Type string `json:"type"` OperationID string `json:"operationId"` Parameters []struct { Name string `json:"name"` Source *string `json:"source"` Template *string `json:"template"` } `json:"parameters"` } `json:"undo"` }
UndoAction describes undo action.