# Functions
Bulk add test data for seeding consul.
CheckDir checks whether a directory exists.
CheckFile checks whether a file exists or not.
CheckStateFile checks statefile in the default Terraform backend ConsulKV.
ConsulServiceRegistered returns whether the Consul service with the given ID is registered or not.
CopyFile copies a file from src to dst.
CopyFiles copies a list of files to a destination (dst) directory.
No description provided by the author
No description provided by the author
FindFileMatches walks a root directory and returns a list of all files that match a particular pattern string.
FreePort finds the next free port incrementing upwards.
GetConsulService returns a service instance with the given ID from the Consul agent.
ListConsulChecks returns a list of checks from a Consul agent.
ListConsulServices returns a list of services registered with the Consul agent.
MakeTempDir creates a directory in the current path for a test.
NewHttpClient returns an HTTP client that returns mocked responses to specific request paths based on the specified intercepts.
NewTestConsulServer starts a test Consul server as configured.
RegisterConsulService regsiters a service to the Consul Catalog.
RegisterConsulServiceHealth is similar to RegisterConsulService and also sets the health status of the service.
RequestHTTP makes an http request.
RequestHTTPS makes an https request using TLS.
RequestJSON encodes the body to JSON and makes an HTTP request.
Setenv sets an environment variable to a value.
Health status for all services.
All registered services.
Generate service TestService entries.
WaitForConsulCheckStatus polls a Consul check until the check has the given status or the timeout is reached.
WaitForConsulServiceDeregistered polls Consul until the given service is deregistered or the timeout is reached.
WaitForConsulServiceRegistered polls Consul until the given service is registered or the timeout is reached.
WaitForHttpStatusChange performs a blocking http call every pollInterval and returns the response whenever it encounters a StatusCode of newStatus.
WriteFile write a content to a file path.
# Structs
ConsulCheck represents a Consul check with a subset of its attributes that are verified by the tests.
ConsulService represents a Consul service with a subset of its attributes that are verified by the tests.
HttpIntercept represents a mapping of a path to the response that the HTTP client should return for requests to that path (including query parameters).
TestConsulServerConfig configures a test Consul server.
TestingTB implements Consul's testutil.TestingTB.
No description provided by the author