Documentation ¶
Index ¶
- func BuildDeploymentID(t testing.TB) string
- func NewMockClient(doer func(*http.Request) (*http.Response, error)) *http.Client
- func NewTestConsulInstance(t testing.TB, cfg *config.Configuration) (*testutil.TestServer, *api.Client)
- func NewTestConsulInstanceWithConfig(t testing.TB, cb testutil.ServerConfigCallback, cfg *config.Configuration, ...) (*testutil.TestServer, *api.Client)
- func NewTestConsulInstanceWithConfigAndStore(t testing.TB, cb testutil.ServerConfigCallback, cfg *config.Configuration) (*testutil.TestServer, *api.Client)
- func SetupTestConfig(t testing.TB) config.Configuration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildDeploymentID ¶
BuildDeploymentID allows to create a deploymentID from the test name value
func NewMockClient ¶
NewMockClient creates an http.Client that will produce the given response
func NewTestConsulInstance ¶
func NewTestConsulInstance(t testing.TB, cfg *config.Configuration) (*testutil.TestServer, *api.Client)
NewTestConsulInstance allows to :
- creates and returns a new Consul server and client
- starts a Consul Publisher
- loads stores
- stores common-types to Consul
Warning: You need to defer the server stop command in the caller
func NewTestConsulInstanceWithConfig ¶
func NewTestConsulInstanceWithConfig(t testing.TB, cb testutil.ServerConfigCallback, cfg *config.Configuration, storeCommons bool) (*testutil.TestServer, *api.Client)
NewTestConsulInstanceWithConfig sets up a consul instance for testing :
- creates and returns a new Consul server and client
- starts a Consul Publisher
- stores common-types to Consul only if storeCommons bool parameter is true
Warning: You need to defer the server stop command in the caller
func NewTestConsulInstanceWithConfigAndStore ¶
func NewTestConsulInstanceWithConfigAndStore(t testing.TB, cb testutil.ServerConfigCallback, cfg *config.Configuration) (*testutil.TestServer, *api.Client)
NewTestConsulInstanceWithConfigAndStore sets up a consul instance for testing
func SetupTestConfig ¶
func SetupTestConfig(t testing.TB) config.Configuration
SetupTestConfig sets working directory configuration Warning: You need to defer the working directory removal
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.