Documentation
¶
Index ¶
- func Client(t *testing.T, dut *ondatra.DUTDevice) *client.Client
- func DeployAndStart(ctx context.Context, t *testing.T, cli *client.Client, ...) error
- func Setup(ctx context.Context, t *testing.T, dut *ondatra.DUTDevice, ...) (*client.Client, func())
- func Stop(ctx context.Context, t *testing.T, cli *client.Client, instNameToStop string)
- func WaitForRunning(ctx context.Context, t *testing.T, cli *client.Client, instanceName string, ...) error
- type StartContainerOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeployAndStart ¶
func DeployAndStart(ctx context.Context, t *testing.T, cli *client.Client, opts StartContainerOptions) error
DeployAndStart sets up and starts a container according to the provided options.
func Setup ¶
func Setup(ctx context.Context, t *testing.T, dut *ondatra.DUTDevice, opts StartContainerOptions) (*client.Client, func())
Setup is a helper function that deploys and starts a container, and returns a client and a cleanup function that stops and removes the container. It calls t.Fatalf on failure.
Types ¶
type StartContainerOptions ¶
type StartContainerOptions struct {
ImageName string
ImageTag string
TarPath string
InstanceName string
Command string
Ports []string
RemoveExistingImage bool
PollForRunningState bool
PollTimeout time.Duration
PollInterval time.Duration
Network string
}
StartContainerOptions holds parameters for starting a container.
Click to show internal directories.
Click to hide internal directories.