common

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolP

func BoolP(input bool) *bool

BoolP returns a pointer of a given input.

func CompareStringSlices

func CompareStringSlices(t *testing.T, this, that []string)

CompareStringSlices cpmpares if two string slices have the same length and same values.

func GetEnvOrDefault

func GetEnvOrDefault(key, fallback string) string

GetEnvOrDefault returns the value of an environment variable or fallback value, if environment variable is undefined or empty.

func Int64P

func Int64P(input int64) *int64

Int64P returns a pointer of a given input.

func StringP

func StringP(input string) *string

StringP returns a pointer of a given input.

func StringSlicesEqual

func StringSlicesEqual(t *testing.T, this, that []string) bool

StringSlicesEqual compares two slices without failing the test.

func WaitForContainerExit0

func WaitForContainerExit0(t *testing.T, pool *dockertest.Pool, containerID string) error

WaitForContainerExit0 waits for the container to exist with code 0.

Types

type RandomPortSupplier

type RandomPortSupplier interface {
	Cleanup()
	Discover() error
	DiscoveredHost() (string, bool)
	DiscoveredPort() (string, bool)
}

RandomPortSupplier wraps the functionality for random port handling in tests.

func NewRandomPortSupplier

func NewRandomPortSupplier() (RandomPortSupplier, error)

NewRandomPortSupplier creates an initialized instance of a random port supplier.

Jump to

Keyboard shortcuts

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