testutils

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertFileInTar

func AssertFileInTar(t testing.TB, tr *tar.Reader, expected ExpectedFile)

Asserts whether or not this file is in the tar.

func AssertFilesInTar

func AssertFilesInTar(t testing.TB, tr *tar.Reader, expectedFiles []ExpectedFile)

Asserts whether or not these files are in the tar, but not that they are the only files in the tarball.

Types

type ExpectedFile

type ExpectedFile struct {
	Path     string
	Contents string

	// If true, we will assert that the file is not in the tarball.
	Missing bool

	// If true, we will assert the file is a dir.
	IsDir bool

	// If true, we will assert that UID and GID are 0
	AssertUidAndGidAreZero bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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