testutils

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArchiveToMap

func ArchiveToMap(a *txtar.Archive) map[string][]byte

Convert an archive to a map where the keys are the filenames

func Equal

func Equal[T comparable](t testing.TB, expected, got T)

Equal asserts that expected = got

func IsErr

func IsErr(t testing.TB, err error, messageArgs ...interface{})

IsErr asserts that err is non nil

func NotErr

func NotErr(t testing.TB, err error, messageArgs ...interface{})

NotErr asserts that err is nil

func PtrInt

func PtrInt(i int) *int

ptrInt is a helper function to create an integer pointer literal

func WriteTxtarToTmp

func WriteTxtarToTmp(t testing.TB, txtarPath string) (string, func())

Write txtar file to a temp directory

Types

This section is empty.

Jump to

Keyboard shortcuts

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