testutil

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2021 License: Apache-2.0 Imports: 2 Imported by: 3

Documentation

Index

Constants

View Source
const (
	// SampleImageRepoName is the repo name of the sample image.
	SampleImageRepoName = "library/alpine"

	// SampleImageTag is the tag of the sample image.
	SampleImageTag = "latest"

	// SampleImageConfigDigest is the digest of the data layer in sample image.
	SampleImageConfigDigest = "a052f56e596097698ac74bb4b03607f2dd6bc026751878ff5d57a74bb043f098"

	// SampleLayerTarDigest is the digest of image config in sample image.
	SampleLayerTarDigest = "393ccd5c4dd90344c9d725125e13f636ce0087c62f5ca89050faaacbb9e3ed5b"
)

Variables

This section is empty.

Functions

func CurrGID

func CurrGID() int

CurrGID returns the primary GID of the current user, used for testing only.

func CurrUID

func CurrUID() int

CurrUID returns the UID of the current user, used for testing only.

func CurrUser

func CurrUser() string

CurrUser returns the string representation of the current user, used for testing only.

Types

type Cleanup

type Cleanup struct {
	// contains filtered or unexported fields
}

Cleanup contains a list of function that are called to cleanup a fixture

func (*Cleanup) Add

func (c *Cleanup) Add(f ...func())

Add adds function to funcs list

func (*Cleanup) AppendFront

func (c *Cleanup) AppendFront(c1 *Cleanup)

AppendFront append funcs from another cleanup in front of the funcs list

func (*Cleanup) Recover

func (c *Cleanup) Recover()

Recover runs cleanup functions after test exit with exception

func (*Cleanup) Run

func (c *Cleanup) Run()

Run runs cleanup functions when a test finishes running

Jump to

Keyboard shortcuts

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