golden

package
v0.20.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2025 License: Apache-2.0 Imports: 23 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewValidator

func NewValidator(t T, b *scheme.Builder) *validator

Types

type T

type T interface {
	Cleanup(func())
	Errorf(format string, args ...interface{})
	Fatalf(format string, args ...interface{})
	Helper()
	Logf(format string, args ...interface{})
	TempDir() string
}

T re-exposes the parts of testing.T we're using as an interface, in order to play more nicely with third-party libraries (e.g. gomega). This helps making these testing utils compatible with the testing strategy generated by kubebuilder.

Note that testing.T has a bunch of other things as well; these are just the ones currently in use in this project.

See e.g. https://github.com/onsi/ginkgo/blob/master/ginkgo_t_dsl.go#L7-L17

Jump to

Keyboard shortcuts

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