Documentation ¶
Overview ¶
Package harness provides various harnesses that features can use to test against. The harnesses act on the StepFn of the test to both build the testing environment (such as kubernetes clusters), and to execute the test itself. For example, the kubernetes harness will use the StepFn to create a kubernetes cluster, and then execute the test against that cluster.
TODO: This package is a mess right now with all sorts of os/exec nastiness. Factor this out into proper use of the docker sdk when the api stabilizes.
Index ¶
- func NewBase() *base
- func NewContainer(ctx context.Context, name string, cfg ContainerConfig) (types.Harness, error)
- func NewHost() types.Harness
- func NewK3s(id string, cfg K3sConfig) (types.Harness, error)
- type ContainerConfig
- type ContainerConfigMount
- type Executor
- type HostExecutor
- type K3sConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewContainer ¶
Types ¶
type ContainerConfig ¶
type ContainerConfig struct { Env map[string]string Image string Mounts []ContainerConfigMount Privileged bool }
type ContainerConfigMount ¶
ContainerConfigMount is a simplified wrapper around mount.Mount, intended to only support BindMounts
type Executor ¶
Executor is an interface for executing commands.
func NewHostExecutor ¶
func NewHostExecutor() Executor
type HostExecutor ¶
type HostExecutor struct { // Env is a map of environment variables to set when running commands. Env map[string]string }
HostExecutor is an implementation of Executor that runs commands on the host