Documentation ¶
Index ¶
- func CleanupConfigFileAfterTest(t *testing.T, file string)
- func CleanupDirectoryAfterTest(t *testing.T, dir string)
- func CollectDockerLogs() error
- func CreateNewConfigYaml(name string) (string, error)
- func CreateTempDirectory(pattern string) string
- func DockerComposeDown(composeFile string) (string, error)
- func DockerComposeUp(composeFile string) (string, error)
- func EnsureCommandContains(g *WithT, t *testing.T, command *cobra.Command, expected string, ...)
- func EnsureCommandContainsAll(g *WithT, t *testing.T, command *cobra.Command, expectedCSV string, ...)
- func EnsureCommandErrorContains(g *WithT, t *testing.T, command *cobra.Command, expected string, ...)
- func EnsureCommandNotContains(g *WithT, t *testing.T, command *cobra.Command, expected string, ...)
- func EnsureCommandOutputEquals(g *WithT, t *testing.T, command *cobra.Command, expected string, ...)
- func ExecuteCommand(t *testing.T, root *cobra.Command, args ...string) (c *cobra.Command, output string, err error)
- func ExecuteHostCommand(name string, arg ...string) (string, error)
- func FileExistsInDirectory(dir string, file string) bool
- func GetCommandOutput(t *testing.T, command *cobra.Command, args ...string) string
- func GetFilePath(fileName string) string
- func GetManagementUrl(httpPort int) string
- func GetRestUrl(restPort int) string
- func IssueGetRequest(url string) ([]byte, error)
- func IssuePostRequest(url string) ([]byte, error)
- func SetTestContext(context *TestContext)
- func Sleep(seconds int)
- func StartCoherenceCluster(fileName, url string) error
- func StartDockerImage(t *testing.T, image string, name string, httpPort int, clusterName string, ...) (string, error)
- func StopDockerImage(name string) (string, error)
- func WaitForHttpBalancedServices(url string, timeout int) error
- func WaitForHttpReady(url string, timeout int) error
- func WaitForIdlePersistence(timeout int, dataFetcher fetcher.Fetcher, serviceName string) error
- type TestContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanupConfigFileAfterTest ¶
CleanupConfigFileAfterTest cleans up a config file after a test.
func CleanupDirectoryAfterTest ¶
CleanupDirectoryAfterTest cleans up a directory after a test.
func CreateNewConfigYaml ¶
CreateNewConfigYaml creates a full path of a new directory and config.
func CreateTempDirectory ¶
CreateTempDirectory creates a temporary directory.
func DockerComposeDown ¶
DockerComposeDown runs docker compose down on a given file.
func DockerComposeUp ¶
DockerComposeUp runs docker compose up on a given file.
func EnsureCommandContains ¶
func EnsureCommandContains(g *WithT, t *testing.T, command *cobra.Command, expected string, args ...string)
EnsureCommandContains executes a command and checks that it contains the output expected.
func EnsureCommandContainsAll ¶
func EnsureCommandContainsAll(g *WithT, t *testing.T, command *cobra.Command, expectedCSV string, args ...string)
EnsureCommandContainsAll executes a command and checks that it contains all the comma separated values in expectedCSV.
func EnsureCommandErrorContains ¶
func EnsureCommandErrorContains(g *WithT, t *testing.T, command *cobra.Command, expected string, args ...string)
EnsureCommandErrorContains executes a command and checks that the error contains expected output.
func EnsureCommandNotContains ¶
func EnsureCommandNotContains(g *WithT, t *testing.T, command *cobra.Command, expected string, args ...string)
EnsureCommandNotContains executes a command and checks that it does not contain the output expected.
func EnsureCommandOutputEquals ¶
func EnsureCommandOutputEquals(g *WithT, t *testing.T, command *cobra.Command, expected string, args ...string)
EnsureCommandOutputEquals executes a command and checks that it equals the output expected.
func ExecuteCommand ¶
func ExecuteCommand(t *testing.T, root *cobra.Command, args ...string) (c *cobra.Command, output string, err error)
ExecuteCommand executes a given command with the arguments provided.
func ExecuteHostCommand ¶
ExecuteHostCommand executes a host command.
func FileExistsInDirectory ¶
FileExistsInDirectory returns true if a file exists in a directory.
func GetCommandOutput ¶
GetCommandOutput returns the output from a command.
func GetFilePath ¶
GetFilePath returns the file path of a file.
func GetManagementUrl ¶
GetManagementUrl returns the management URL given a management port.
func IssueGetRequest ¶
IssueGetRequest issues a HTTP GET request using the URL.
func IssuePostRequest ¶
IssuePostRequest issues a HTTP POST request using the URL.
func SetTestContext ¶
func SetTestContext(context *TestContext)
SetTestContext sets the current context.
func StartCoherenceCluster ¶
StartCoherenceCluster starts a Coherence cluster.
func StartDockerImage ¶
func StartDockerImage(t *testing.T, image string, name string, httpPort int, clusterName string, delete bool) (string, error)
StartDockerImage starts a coherence image using docker.
func StopDockerImage ¶
StopDockerImage stops a docker image with the given name.
func WaitForHttpBalancedServices ¶
WaitForHttpBalancedServices waits for all services to be balanced.
func WaitForHttpReady ¶
WaitForHttpReady waits for the HTTP endpoint to be ready.