testutils

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2020 License: MIT Imports: 25 Imported by: 0

README

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConstructRegistryAuth

func ConstructRegistryAuth(identity, secret string) (string, error)

ConstructRegistryAuth serializes the auth configuration as JSON base64 payload.

Types

type TestHelper

type TestHelper struct {
	DockerClient *client.Client
	Conf         *viper.Viper
}

TestHelper implements methods to manipulate docker registry from test cases

func NewTestHelper

func NewTestHelper(conf *viper.Viper) *TestHelper

func (*TestHelper) AddImageToRegistry

func (helper *TestHelper) AddImageToRegistry(publicImage, mockImage string) error

AddImageToRegistry adds images to a registry.

func (*TestHelper) RemoveContainer

func (helper *TestHelper) RemoveContainer(ctrs ...string) (err error)

RemoveContainer removes with force a container by it's container ID.

func (*TestHelper) StartPostgres

func (helper *TestHelper) StartPostgres() (string, error)

StartPostgres starts a new postgres container.

func (*TestHelper) StartRegistry

func (helper *TestHelper) StartRegistry() (string, string, error)

StartRegistry starts a new registry container.

Jump to

Keyboard shortcuts

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