Documentation ¶
Index ¶
- func CancelOnInterrupt(ctx context.Context) context.Context
- func CreateTempFile(t *testing.T, data string) string
- func IsMaxRetries(err error) bool
- func KillContainer(containerName string) error
- func OrStrings(strs ...string) string
- func PullImage(imageName string) error
- func Retry(fn Func, maxRetries int) error
- func RunContainer(containerName string, imageName string, exposedPorts nat.PortSet, ...) error
- func RunContainerWithEnv(containerName string, imageName string, envVariables []string, ...) error
- type Func
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CancelOnInterrupt ¶ added in v0.3.0
CancelOnInterrupt creates a context and calls the context cancel function when an interrupt signal is caught
func CreateTempFile ¶ added in v0.3.0
CreateTempFile creates a temporary file for tests with data as content.
func IsMaxRetries ¶
IsMaxRetries checks whether the error is due to hitting the maximum number of retries or not.
func KillContainer ¶ added in v0.2.0
KillContainer stops and removes specified container.
func PullImage ¶ added in v0.2.0
PullImage pulls an image from docker hub if image is not available or not up to date.
func Retry ¶
Retry keeps trying the function until the second argument returns false, or no error is returned.
Types ¶
Click to show internal directories.
Click to hide internal directories.