testutil

package
v0.0.0-...-ce5aec8 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareFileWithFixture

func CompareFileWithFixture(t *testing.T, outputFile string, opts ...option)

CompareFileWithFixture loads data from the outputFile and compares the content with a golden fixture.

func CompareWithFixture

func CompareWithFixture(t *testing.T, output interface{}, opts ...option)

CompareWithFixture will compare output with a test fixture and allows to automatically update them by setting the UPDATE env var. If output is not a []byte or string, it will get serialized as yaml prior to the comparison. The fixtures are stored in $PWD/testdata/prefix${testName}.yaml

func WithExtension

func WithExtension(extension string) option

func WithSubDir

func WithSubDir(subDir string) option

func WithSuffix

func WithSuffix(suffix string) option

func WithoutDirMangling

func WithoutDirMangling() option

Types

This section is empty.

Jump to

Keyboard shortcuts

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