env

package
v1.7.14 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2021 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultNsName = "crdb-test-"
)

Variables

This section is empty.

Functions

func RunCode added in v1.7.13

func RunCode(m *testing.M, e *Env) int

Types

type ActiveEnv

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

type DiffingSandbox

type DiffingSandbox struct {
	Sandbox
	// contains filtered or unexported fields
}

func NewDiffingSandbox

func NewDiffingSandbox(t *testing.T, env *ActiveEnv) DiffingSandbox

func (*DiffingSandbox) Diff

func (ds *DiffingSandbox) Diff() (string, error)

type Env

type Env struct {
	envtest.Environment
	Scheme *apiruntime.Scheme
}

func CreateActiveEnvForTest added in v1.7.13

func CreateActiveEnvForTest(levels []string) *Env

func NewEnv

func NewEnv(builder apiruntime.SchemeBuilder, crds ...string) *Env

func (*Env) Start

func (env *Env) Start() *ActiveEnv

func (*Env) Stop

func (env *Env) Stop()

func (*Env) StopAndExit

func (env *Env) StopAndExit(code int)

type Sandbox

type Sandbox struct {
	Mgr ctrl.Manager

	Namespace string
	// contains filtered or unexported fields
}

func NewSandbox

func NewSandbox(t *testing.T, env *ActiveEnv) Sandbox

func (Sandbox) Cleanup

func (s Sandbox) Cleanup()

func (Sandbox) Create

func (s Sandbox) Create(obj client.Object) error

func (Sandbox) Get

func (s Sandbox) Get(o client.Object) error

func (Sandbox) List

func (s Sandbox) List(list client.ObjectList, labels map[string]string) error

func (Sandbox) StartManager

func (s Sandbox) StartManager(t *testing.T, maker func(ctrl.Manager) error)

func (Sandbox) Update

func (s Sandbox) Update(obj client.Object) error

Jump to

Keyboard shortcuts

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