test

package
v0.1.42 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UpdateGolden = flag.Bool("update", false, "update golden files")

UpdateGolden writes out the golden files with the latest values, rather than failing the test. Example: go test ./cmd/svcat --update

Functions

func AssertEqualsGoldenFile

func AssertEqualsGoldenFile(t *testing.T, goldenFile string, got string)

AssertEqualsGoldenFile asserts that the value equals the contents of the golden file. When the go test -update flag is present, the golden file is updated to match, rather than failing the test.

func GetTestdata

func GetTestdata(relpath string) (fullpath string, contents []byte, err error)

GetTestdata returns the contents of a testdata file. * relpath - relative path to the file in the test's testdata directory.

Types

This section is empty.

Jump to

Keyboard shortcuts

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