testutils

package
v0.0.0-...-04bf11e Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package testutils provides common utilities for unit tests. The package should not be imported from appliation code, only from unit tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertGolden

func AssertGolden(t *testing.T, actual, filename string)

AssertGolden checks that actual matches the contents of a golden file. The golden file is updated if -test.update-golden is set.

func SnapshotJSONMap

func SnapshotJSONMap(m map[string]string) string

SnapshotJSONMap takes a snapshot of a map where each value is json encoded. The values are pretty printed to a yaml output.

func SnapshotStringMap

func SnapshotStringMap(m map[string]string) string

SnapshotStringMap takes a snapshot of m and encodes the result as json.

Types

This section is empty.

Jump to

Keyboard shortcuts

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