Documentation ¶
Index ¶
- Constants
- Variables
- func CountRequestFrom(s string) int
- func DeleteMountebankImposter(url string)
- func GetPortFromURL(urlString string) (int, error)
- func GetTestEndpoint(endpoint string) int
- func GetTestEndpointOutput(endpoint string) (string, error)
- func GetTestEndpointWithHeader(endpoint string, header string, value string) int
- func KillSpawnedProcess(pid int, port int, agentURL string) error
- func MountebankSetup(endpoint string, config string) error
- func PutDefinition(serviceURI string, payload string, agentURL string) (int, error)
- func PutDefinitionOk(serviceURI string, payload string, agentURL string) error
- func Spawn(name string, port int, agentURL string) (int, error)
- func SpawnTestContainers() map[string]string
- func StopAndRemoveContainers(containers map[string]string)
Constants ¶
const ( XaviTestContainer = "xavi" MountebankTestContainer = "mountebank" )
const RoundRobin3000Config = `` /* 529-byte string literal not displayed */
roundRobin3000Config is the mountebank imposter definition for the test server running on port 3000 that xavi proxies
const RoundRobin3100Config = `` /* 528-byte string literal not displayed */
roundRobin3100Config is the mountebank imposter definition for the test server running on port 3000 that xavi proxies
Variables ¶
var ( XaviAgentRESTEnpointBaseURI string XaviAcceptanceTestEndpointBaseURL string StandaloneMountebackEndpointBaseURL string CohostedMountebankEndpointBaseURL string )
Functions ¶
func CountRequestFrom ¶
CountRequestFrom returns the number of occurances of "requestFrom:" is the given string. This is useful when looking at imposter stats obtained from a mountebank server.
func DeleteMountebankImposter ¶
func DeleteMountebankImposter(url string)
DeleteMountebankImposter is used to delete a Mountebank imposter via a delete to an imposter resource
func GetPortFromURL ¶
func GetTestEndpoint ¶
GetTestEndpoint returns the HTTP status code obtained from doing an HTTP get on the supplied endpoint
func GetTestEndpointOutput ¶
GetTestEndpointOutput returns the response obtained via an HTTP Get on endpoint
func KillSpawnedProcess ¶
KillSpawnedProcess uses the spawn-killer endpoint in the xavi agent to kill a spawned process. This is useful in cleaning up processes that were spawned to execute a test case.
func MountebankSetup ¶
MountebankSetup is used to post mountebank setup configuration to a mountebank endpoint.
func PutDefinition ¶
PutDefinition is used to put an entity to an HTTP endpoint. This is used to put XAVI setup definitions to an endpoint.
func PutDefinitionOk ¶
PutDefinitionOk calls PutDefinition, returning an error if PutDefinition returns and error or a status code other than StatusOk
func Spawn ¶
Spawn used the XAVI spawn-listener endpoint to start an instance of XAVI for testing. The spawned process uses the definitions associated with the named listener.
func SpawnTestContainers ¶
SpawnTestContainers checks the status of the required test containers that must be running in able for the acceptance tests to execute successfully. If the containers are not running then they are started. The map that is returned containers container name to container id mapping.
func StopAndRemoveContainers ¶
StopAndRemoveContainers stops and removes the containers in the given map
Types ¶
This section is empty.