package
10.1.0
Repository: https://github.com/gazebo-web/gz-go.git
Documentation: pkg.go.dev

# Functions

AssertBackendErrorCode is a function that tries to unmarshal a backend's ErrMsg and compares to given error code.
AssertRoute is a helper function that checks for a valid route \param[in] method One of "GET", "PATCH", "PUT", "POST", "DELETE", "OPTIONS" \param[in] route The URL string \param[in] code The expected result HTTP code \param[in] t Testing pointer \return[out] *[]byte A pointer to a bytes slice containing the response body.
AssertRouteMultipleArgs is a helper function that checks for a valid route.
AssertRouteMultipleArgsStruct is a convenient helper function that accepts input arguments as a struct, allowing us to keep extending the number of args without changing the func signature and the corresponding invocation code everywhere.
AssertRouteWithBody is a helper function that checks for a valid route \return[out] *[]byte A pointer to a bytes slice containing the response body.
CreateTmpFolderWithContents creates a tmp folder with the given files and returns the path to the created folder.
GetIndentedTraceToTest returns a formatted and indented string containing the file and line number of each stack frame leading from the current test to the assert call that failed.
InvalidRouteTestHelper is a helper test function that just invokes an invalid route.
OptionsTestHelper is a helper function to test the autogenerated OPTIONS urls, given a set of Routes' URIs.
SendMultipartMethod executes a multipart POST/PUT/PATCH request with the given form fields and multipart files, and returns the received http status code, the response body, and a success flag.
SendMultipartPOST executes a multipart POST request with the given form fields and multipart files, and returns the received http status code, the response body, and a success flag.
SetupTest - Setup helper function.

# Structs

AssertResponse - response of AssertRouteMultipleArgsStruct func.
FileDesc describes a file to be created.
RequestArgs - input arguments struct used by AssertRouteMultipleArgsStruct func.