Documentation
¶
Index ¶
- Variables
- func ApplicationOutputHasLines(expectedLines []string) func(t *testing.T, response *Response, serverOutput []byte, state *E2eState)
- func AssertMapHasValues[T_Key comparable, T_Value comparable](t *testing.T, subject map[T_Key]T_Value, values map[T_Key]T_Value)
- func AssertTimeDifferenceEqualOrMoreThanSeconds(t *testing.T, timeA, timeB time.Time, seconds int)
- func AssertTimeDifferenceLessThanSeconds(t *testing.T, timeA, timeB time.Time, seconds int)
- func BuildFormPayload(data map[string]string) io.Reader
- func EnvVarExists(varName string) bool
- func GetKeys[T_Key comparable, T_Value interface{}](subject map[T_Key]T_Value) []T_Key
- func HeaderKeysNotIncluded(headerKeys []string) func(t *testing.T, response *Response, serverOutput []byte, state *E2eState)
- func HeadersMatch(expectedHeaders map[string]string) func(t *testing.T, response *Response, serverOutput []byte, state *E2eState)
- func IndexOf[T comparable](list []T, value T) int
- func JsonMatches(expectedJson map[string]interface{}) func(t *testing.T, response *Response, serverOutput []byte, state *E2eState)
- func LineEquals(lineNumber int, expectedLine string) func(t *testing.T, response *Response, serverOutput []byte, state *E2eState)
- func LineRegexMatches(lineNumber int, regex string) func(t *testing.T, response *Response, serverOutput []byte, state *E2eState)
- func MockAssert(assertOptions *mocklib.AssertOptions, serverOutput *bytes.Buffer, ...) []mocklib.ValidationError
- func RequestApiReset(config *mocklib.MockConfig)
- func RunMock(state *E2eState, command string) ([]byte, error)
- func RunTest(t *testing.T, configurationFilePath, method, route string, ...)
- func RunTestBase(t *testing.T, configurationFilePath, extraArgs string, requests []TestRequest, ...)
- func RunTestWithArgs(t *testing.T, configurationFilePath string, args []string, ...)
- func RunTestWithArgsAndEnv(t *testing.T, args []string, method, route string, headers map[string]string, ...)
- func RunTestWithEnv(t *testing.T, configurationFilePath, method, route string, ...)
- func RunTestWithJsonConfig(t *testing.T, jsonStr string, args []string, method, route string, ...)
- func RunTestWithMultipleRequests(t *testing.T, configurationFilePath string, requests []TestRequest, ...)
- func RunTestWithNoConfigAndWithArgs(t *testing.T, args []string, method, route string, headers map[string]string, ...)
- func StatusCodeMatches(expectedStatusCode int) func(t *testing.T, response *Response, serverOutput []byte, state *E2eState)
- func StringMatches(expected string) func(t *testing.T, response *Response, serverOutput []byte, state *E2eState)
- type E2eState
- type KillMockFunc
- type Response
- type TestRequest
Constants ¶
This section is empty.
Variables ¶
View Source
var ContentTypeJsonHeaders map[string]string = map[string]string{
"Content-type": "application/json",
}
Functions ¶
func ApplicationOutputHasLines ¶ added in v1.0.0
func AssertMapHasValues ¶ added in v0.2.0
func AssertMapHasValues[T_Key comparable, T_Value comparable]( t *testing.T, subject map[T_Key]T_Value, values map[T_Key]T_Value, )
func AssertTimeDifferenceEqualOrMoreThanSeconds ¶ added in v0.3.0
func AssertTimeDifferenceLessThanSeconds ¶ added in v0.3.0
func EnvVarExists ¶ added in v1.0.0
func GetKeys ¶ added in v0.2.0
func GetKeys[T_Key comparable, T_Value interface{}](subject map[T_Key]T_Value) []T_Key
func HeaderKeysNotIncluded ¶ added in v0.5.0
func HeadersMatch ¶ added in v0.2.0
func IndexOf ¶ added in v0.2.0
func IndexOf[T comparable](list []T, value T) int
func JsonMatches ¶ added in v0.1.0
func LineEquals ¶ added in v0.2.0
func LineRegexMatches ¶ added in v0.2.0
func MockAssert ¶
func MockAssert(assertOptions *mocklib.AssertOptions, serverOutput *bytes.Buffer, state *E2eState) []mocklib.ValidationError
func RequestApiReset ¶ added in v0.1.1
func RequestApiReset(config *mocklib.MockConfig)
func RunTestBase ¶ added in v0.6.0
func RunTestWithArgs ¶ added in v0.7.0
func RunTestWithArgsAndEnv ¶ added in v1.3.0
func RunTestWithEnv ¶ added in v0.6.0
func RunTestWithJsonConfig ¶ added in v1.3.0
func RunTestWithMultipleRequests ¶ added in v0.8.0
func RunTestWithNoConfigAndWithArgs ¶ added in v0.7.0
func StatusCodeMatches ¶ added in v0.2.0
Types ¶
type KillMockFunc ¶
type KillMockFunc func()
type TestRequest ¶ added in v0.8.0
func NewGetTestRequest ¶ added in v0.8.0
func NewGetTestRequest(route string) *TestRequest
func NewPostTestRequest ¶ added in v0.8.0
func NewPostTestRequest(route string) *TestRequest
Click to show internal directories.
Click to hide internal directories.