testhelper

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Chdir

func Chdir(t *testing.T, path string)

func ExitOnErr

func ExitOnErr(t *testing.T, err error)

func Hash

func Hash(buf []byte) string

func MustGenTgzArchive

func MustGenTgzArchive(path, content string) (string, io.Reader)

MustGenTgzArchive compresses the file with given content on given path and returns checksum and bytes of the result.

func MustGenTgzArchiveDir

func MustGenTgzArchiveDir(dir string) (string, io.Reader)

func NewTestDataFromFixture

func NewTestDataFromFixture(name string, o v1.Object) error

NewTestDataFromFixture loads test fixture from ./fixtures dir and unmarshal as v1.Object.

func WriteFileWithMkdir

func WriteFileWithMkdir(path string, buf []byte) error

WriteFileWithMkdir writes data to the named file, along with any necessary parent directories.

Types

This section is empty.

Jump to

Keyboard shortcuts

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