testframework

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 11, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildGoBinary

func BuildGoBinary(t *testing.T, sourcePath string, outputName string) error

BuildGoBinary builds a go binary for linux/amd64 and returns its path.

func BuildGoTestBinary

func BuildGoTestBinary(t *testing.T, pkgPath string, outputName string) error

BuildGoTestBinary builds a go test binary for linux/amd64 and returns its path.

func SetupPodmanEnv

func SetupPodmanEnv(t *testing.T)

SetupPodmanEnv configures the environment to use podman for testcontainers.

func StartKeycloakContainer

func StartKeycloakContainer(ctx context.Context, t *testing.T, realmConfigPath string) (testcontainers.Container, error)

StartKeycloakContainer starts a Keycloak container for testing OAuth2 authentication. It imports the provided realm configuration file.

func StartSystemdContainer

func StartSystemdContainer(ctx context.Context, t *testing.T, files []testcontainers.ContainerFile) (testcontainers.Container, error)

StartSystemdContainer starts an openSUSE bci-init container with systemd as PID 1. It accepts optional files to inject into the container before starting.

func WaitForService

func WaitForService(ctx context.Context, t *testing.T, container testcontainers.Container, serviceName string) error

WaitForService enables and starts a service inside the container, then waits for it.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL