Documentation
¶
Index ¶
- func GetTestImage(defaultImage string) string
- func TestCommandSucceeds(t *testing.T, ctx context.Context, image string, config *ContainerConfig, ...)
- func TestFileExists(t *testing.T, ctx context.Context, image string, filePath string, ...)
- func TestHTTPEndpoint(t *testing.T, ctx context.Context, image string, httpConfig HTTPTestConfig, ...)
- type ContainerConfig
- type HTTPTestConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTestImage ¶
GetTestImage returns the image to test from TEST_IMAGE env var or falls back to the default
func TestCommandSucceeds ¶
func TestCommandSucceeds(t *testing.T, ctx context.Context, image string, config *ContainerConfig, entrypoint string, args ...string)
TestCommandSucceeds tests that a command runs successfully in the container (exit code 0)
func TestFileExists ¶
func TestFileExists(t *testing.T, ctx context.Context, image string, filePath string, config *ContainerConfig)
TestFileExists tests that a file exists in the container
func TestHTTPEndpoint ¶
func TestHTTPEndpoint(t *testing.T, ctx context.Context, image string, httpConfig HTTPTestConfig, containerConfig *ContainerConfig)
TestHTTPEndpoint tests that an HTTP endpoint is accessible and returns the expected status code
Types ¶
type ContainerConfig ¶
type ContainerConfig struct {
Env map[string]string // Environment variables to set in the container
}
ContainerConfig holds optional container configuration
type HTTPTestConfig ¶
HTTPTestConfig holds the configuration for HTTP endpoint tests
Click to show internal directories.
Click to hide internal directories.