testenv

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssetBinPath added in v0.3.0

func AssetBinPath(name string) string

func CreateObjects added in v0.3.0

func CreateObjects(objects []runtime.Object) error

func DeleteObjects added in v0.3.0

func DeleteObjects(objects []runtime.Object) error

func GetChangedObjects added in v0.3.0

func GetChangedObjects(changes []Change) ([]runtime.Object, error)

func GetClient added in v0.3.0

func GetClient() client.Client

func GetScheme added in v0.3.0

func GetScheme() *runtime.Scheme

func ListEvents added in v0.3.0

func ListEvents(options ...client.ListOptionFunc) ([]corev1.Event, error)

func ProjectDir added in v0.3.0

func ProjectDir() string

func RunSpecsInEnvironment added in v0.3.0

func RunSpecsInEnvironment(t *testing.T, desc string)

Types

type Change added in v0.3.0

type Change struct {
	schema.GroupVersionKind
	types.NamespacedName

	Type string
}

func GetChanges added in v0.3.0

func GetChanges(c interface{}) []Change

type Environment added in v0.3.0

type Environment struct {
	ControlPlane      *integration.ControlPlane
	CRDInstallOptions envtest.CRDInstallOptions
	// contains filtered or unexported fields
}
var Env *Environment

Env is a global environment for testing. nolint: gochecknoglobals

func (*Environment) GetClient added in v0.3.0

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

func (*Environment) GetConfig added in v0.3.0

func (e *Environment) GetConfig() *rest.Config

func (*Environment) GetScheme added in v0.3.0

func (e *Environment) GetScheme() *runtime.Scheme

func (*Environment) NewManager added in v0.3.0

func (e *Environment) NewManager() (*Manager, error)

func (*Environment) Start added in v0.3.0

func (e *Environment) Start() (err error)

func (*Environment) Stop added in v0.3.0

func (e *Environment) Stop() error

type EventData added in v0.3.0

type EventData struct {
	Type    string
	Reason  string
	Message string
}

func MapEventData added in v0.3.0

func MapEventData(events []corev1.Event) []EventData

type Manager added in v0.3.0

type Manager struct {
	manager.Manager
	// contains filtered or unexported fields
}

func NewManager added in v0.3.0

func NewManager() (*Manager, error)

func (*Manager) GetClient added in v0.3.0

func (m *Manager) GetClient() client.Client

func (*Manager) Initialize added in v0.3.0

func (m *Manager) Initialize() (err error)

func (*Manager) Stop added in v0.3.0

func (m *Manager) Stop()

func (*Manager) WaitForSync added in v0.3.0

func (m *Manager) WaitForSync()

type Recorder added in v0.3.0

type Recorder interface {
	Changes() []Change
}

Jump to

Keyboard shortcuts

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