envtest

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunWithEnvironment

func RunWithEnvironment(m *testing.M, opts ...EnvironmentOpt) int

RunWithEnvironment runs a suite of tests with an envtest that is shared across all tests We use testing.M as the input to avoid having this called directly from a test This ensures the envtest setup is always run from a TestMain

Types

type Environment

type Environment struct {
	// contains filtered or unexported fields
}

func (*Environment) APIReader

func (e *Environment) APIReader() client.Reader

APIReader returns a non cached reader client

func (*Environment) Client

func (e *Environment) Client() client.Client

func (*Environment) CreateNamespaceForTest

func (e *Environment) CreateNamespaceForTest(ctx context.Context, t *testing.T) string

type EnvironmentOpt

type EnvironmentOpt func(ctx context.Context, e *Environment)

func WithAssignment

func WithAssignment(envRef **Environment) EnvironmentOpt

Jump to

Keyboard shortcuts

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