testingutils

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package testingutils provides functionality that is useful in tests accross this project

Package testingutils provides functionality that is useful in tests accross this project

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DockerContainer

type DockerContainer struct {
	// contains filtered or unexported fields
}

DockerContainer wraps types.Container, and makes it easy to create mock responses in tests

func BaseDockerContainer

func BaseDockerContainer(name, containerID string) *DockerContainer

BaseDockerContainer returns a base container that can be customized

func (*DockerContainer) Get

func (apiContainer *DockerContainer) Get() types.Container

Get returns the underlying types.Container

func (*DockerContainer) WithComposeProject

func (apiContainer *DockerContainer) WithComposeProject(projectName string) *DockerContainer

WithComposeProject adds docker compose labels and returns the container for chaining

func (*DockerContainer) WithNetwork

func (apiContainer *DockerContainer) WithNetwork(networkName, ipAddress string) *DockerContainer

WithNetwork adds a Docker Network and returns the container for chaining

type MetadataContainer

type MetadataContainer struct {
	// contains filtered or unexported fields
}

MetadataContainer wraps v2.ContainerResponse, and makes it easy to create mock responses in tests

func BaseMetadataContainer

func BaseMetadataContainer(name, containerID string) *MetadataContainer

BaseMetadataContainer returns a base container that can be customized

func (*MetadataContainer) Get

Get returns the underlying v2.ContainerResponse

func (*MetadataContainer) WithComposeProject

func (c *MetadataContainer) WithComposeProject(projectName string) *MetadataContainer

WithComposeProject adds docker compose labels and returns the container for chaining

func (*MetadataContainer) WithNetwork

func (c *MetadataContainer) WithNetwork(networkName, ipAddress string) *MetadataContainer

WithNetwork adds a Docker Network and returns the container for chaining

Jump to

Keyboard shortcuts

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