testutils

package
v0.2.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertArchiveContainsFile

func AssertArchiveContainsFile(t testing.TB, files []*zip.File, name string)

func CreateTempArchive

func CreateTempArchive(t testing.TB, name string) (*os.File, func())

func Find

func Find[T any](elements []T, cb func(element T) bool) (T, bool)

func GetAllFiles

func GetAllFiles(t testing.TB, dirPath string) []fs.FileInfo

func GetArchiveReader

func GetArchiveReader(t testing.TB, name string) *zip.ReadCloser

func GetFileInfo

func GetFileInfo(t testing.TB, name string) fs.FileInfo

func GetOutput

func GetOutput(t testing.TB, cmd *exec.Cmd) string

func Map

func Map[T, K any](elements []T, cb func(element T) K) []K

Types

This section is empty.

Jump to

Keyboard shortcuts

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