Documentation ¶
Index ¶
- func FindResponseSchema(t *testing.T, paths []*framework.Path, pathIdx int, ...) *framework.Response
- func GetResponseSchema(t *testing.T, path *framework.Path, operation logical.Operation) *framework.Response
- func ValidateResponse(t *testing.T, schema *framework.Response, response *logical.Response, ...)
- func ValidateResponseData(t *testing.T, schema *framework.Response, data map[string]interface{}, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindResponseSchema ¶
func FindResponseSchema(t *testing.T, paths []*framework.Path, pathIdx int, operation logical.Operation) *framework.Response
FindResponseSchema is a test helper to extract the response schema from a given framework path / operation
func GetResponseSchema ¶ added in v0.8.0
func ValidateResponse ¶
func ValidateResponse(t *testing.T, schema *framework.Response, response *logical.Response, strict bool)
ValidateResponseData is a test helper that validates whether the given response data map conforms to the response schema (schema.Fields). It cycles through the data map and validates conversions in the schema. In "strict" mode, this function will also ensure that the data map has all schema's requred fields and does not have any fields outside of the schema.
func ValidateResponseData ¶
func ValidateResponseData(t *testing.T, schema *framework.Response, data map[string]interface{}, strict bool)
ValidateResponse is a test helper that validates whether the given response object conforms to the response schema (schema.Fields). It cycles through the data map and validates conversions in the schema. In "strict" mode, this function will also ensure that the data map has all schema-required fields and does not have any fields outside of the schema.
Types ¶
This section is empty.