testutils

package
v0.8.7 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BusyboxLatestSHA = "bae015c28bc7cdee3b7ef20d35db4299e3068554a769070950229d9f53f58572" // nolint: lll
	GolangLatestSHA  = "6cb55c08bbf44793f16e3572bd7d2ae18f7a858f6ae4faa474c0a6eae1174a5d" // nolint: lll
	RedisLatestSHA   = "09c33840ec47815dc0351f1eca3befe741d7105b3e95bc8fdb9a7e4985b9e1e5" // nolint: lll
)

Variables

This section is empty.

Functions

func AssertFlagsEqual

func AssertFlagsEqual(
	t *testing.T,
	expected interface{},
	got interface{},
)

func AssertImagesEqual

func AssertImagesEqual(
	t *testing.T,
	expected []parse.IImage,
	got []parse.IImage,
)

func AssertNumNetworkCallsEqual

func AssertNumNetworkCallsEqual(t *testing.T, expected uint64, got uint64)

func AssertWrittenFilesEqual

func AssertWrittenFilesEqual(t *testing.T, expected [][]byte, got []string)

func GetAbsPath

func GetAbsPath(t *testing.T) string

func MakeDir

func MakeDir(t *testing.T, dirPath string)

func MakeParentDirsInTempDirFromFilePaths

func MakeParentDirsInTempDirFromFilePaths(
	t *testing.T,
	tempDir string,
	paths []string,
)

func MakeTempDir

func MakeTempDir(t *testing.T, dirName string) string

func MakeTempDirInCurrentDir

func MakeTempDirInCurrentDir(t *testing.T) string

func NewMockDigestRequester added in v0.8.0

func NewMockDigestRequester(
	t *testing.T,
	numNetworkCalls *uint64,
) update.IDigestRequester

func SortComposefileImages

func SortComposefileImages(t *testing.T, images []parse.IImage)

func SortDockerfileImages

func SortDockerfileImages(t *testing.T, images []parse.IImage)

func SortImages

func SortImages(t *testing.T, images []parse.IImage)

func SortKubernetesfileImages

func SortKubernetesfileImages(t *testing.T, images []parse.IImage)

func SortPaths

func SortPaths(t *testing.T, paths []collect.IPath)

func WriteFilesToTempDir

func WriteFilesToTempDir(
	t *testing.T,
	tempDir string,
	fileNames []string,
	fileContents [][]byte,
) []string

Types

This section is empty.

Jump to

Keyboard shortcuts

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