testutil

package
v0.0.0-...-ea10bd8 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareWithFixture

func CompareWithFixture(t *testing.T, golden, output string)

CompareWithFixture will compare output files with a test fixture and allows to automatically update them by setting the UPDATE env var. The output and golden paths are relative to the test's directory.

func CompareWithFixtureDir

func CompareWithFixtureDir(t *testing.T, golden, output string)

CompareWithFixtureDir will compare all files in a directory with a corresponding test fixture directory.

func CompareWithSerializedFixture

func CompareWithSerializedFixture(t *testing.T, data interface{})

CompareWithSerializedFixture compares an object that can be marshalled with a golden file containing the serialized version of the data.

func NewFakeManager

func NewFakeManager(ctx context.Context, objects []runtime.Object, indexSetups ...IndexSetupFunc) (*fakeManager, error)

Types

type IndexSetupFunc

type IndexSetupFunc func(ctx context.Context, indexer ctrlruntimeclient.FieldIndexer) error

type IndexableManager

type IndexableManager interface {
	GetClient() ctrlruntimeclient.Client
	GetFieldIndexer() ctrlruntimeclient.FieldIndexer
}

Jump to

Keyboard shortcuts

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