# Functions
AMSClientWithOrgResults creates a mock of AMSClient interface that returns the results defined by orgID and clusters parameters.
AssertAPIRequest function creates new server with provided serverConfig, servicesConfig (you can leave them nil to use the default ones), groupsChannel and errorChannel (can be set to nil as well) sends api request and checks api response (see docs for APIRequest and APIResponse).
AssertAPIv2Request function is exactly the same as AssertAPIResponse, but intended to use with API v2 endpoints.
CreateHTTPServer creates an instance of the REST API server with provided or default configuration.
GetMockRedis is used to get a mocked Redis client to expect and respond to queries.
RedisExpectationsMet helper function used to ensure mock expectations were met.
# Variables
AssertReportResponsesEqual function fails if report responses aren't equal to each other.
CheckResponseBodyJSON function checks response body.
CleanAfterGock function cleans after gock library and prints all unmatched requests.
DefaultRedisConf is the default Redis configuration used in tests.
DefaultServerConfig is data structure that represents default HTTP server configuration (with CORS disabled).
DefaultServerConfigCORS is data structure that represents default server configuration with CORS enabled.
DefaultServerConfigXRH is data structure that represents default HTTP server configuration with XRH auth type.
DefaultServicesConfig is data structure that represents default services configuration.
ExecuteRequest function executes specified HTTP request.
FailOnError function fails on any error detected in tests.
GockExpectAPIRequest function makes gock expect the request with the baseURL and sends back the response.
MustGobSerialize function serializes an object using gob or panics if serialize oparation fails for any reason.
NewGockAPIEndpointMatcher function creates a matcher for a given endpoint for gock.
RunTestWithTimeout function runs test with specified timeToRun timeout and fails if it wasn't finished in time.
ToJSONString function converts any value or data structure to JSON string.
# Type aliases
APIRequest data type represents APIRequest.
APIResponse data type represents APIResponse.