environment

package
v1.0.761 Latest Latest
Warning

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

Go to latest
Published: May 25, 2021 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyCRDs

func ApplyCRDs(kubeConfig *rest.Config) error

ApplyCRDs applies the CRDs to the cluster

Types

type Environment

type Environment struct {
	*utils.Environment
	Machine
	testing.Catalog
}

Environment test env with helpers to create structs and k8s resources

func NewEnvironment

func NewEnvironment(kubeConfig *rest.Config) *Environment

NewEnvironment returns a new test environment

func (*Environment) NamespaceDeletionInProgress

func (e *Environment) NamespaceDeletionInProgress(err error) bool

NamespaceDeletionInProgress returns true if the error indicates deletion will happen eventually

func (*Environment) SetupClientsets

func (e *Environment) SetupClientsets() error

SetupClientsets initializes kube clientsets

func (*Environment) SetupNamespace

func (e *Environment) SetupNamespace() error

SetupNamespace creates the namespace and the clientsets and prepares the teardowm

func (*Environment) StartOperator

func (e *Environment) StartOperator() error

StartOperator starts the quarks secret operator

type Machine

type Machine struct {
	machine.Machine

	VersionedClientset *versioned.Clientset
}

Machine produces and destroys resources for tests

func (*Machine) CreateCASecret added in v1.0.699

func (m *Machine) CreateCASecret(log *zap.SugaredLogger, namespace string, name string) (machine.TearDownFunc, error)

CreateCASecret creates a CA and stores it in a secret

func (*Machine) CreateQuarksSecret

func (m *Machine) CreateQuarksSecret(namespace string, qs qsv1a1.QuarksSecret) (*qsv1a1.QuarksSecret, machine.TearDownFunc, error)

CreateQuarksSecret creates a QuarksSecret custom resource and returns a function to delete it

func (*Machine) DeleteQuarksSecret

func (m *Machine) DeleteQuarksSecret(namespace string, name string) error

DeleteQuarksSecret deletes an QuarksSecret custom resource

func (*Machine) GetQuarksSecret added in v1.0.730

func (m *Machine) GetQuarksSecret(namespace string, name string) (qsv1a1.QuarksSecret, error)

GetQuarksSecret gets a QuarksSecret custom resource

func (*Machine) UpdateQuarksSecret added in v1.0.739

func (m *Machine) UpdateQuarksSecret(namespace string, qs qsv1a1.QuarksSecret) (qsv1a1.QuarksSecret, error)

UpdateQuarksSecret deletes updates a QuarksSecret custom resource

func (*Machine) WaitForQuarksSecretChange

func (m *Machine) WaitForQuarksSecretChange(namespace string, name string, timeout time.Duration, changed QuarksSecretChangedFunc) error

WaitForQuarksSecretChange waits for the quarks secret to fulfill the change func

type QuarksSecretChangedFunc

type QuarksSecretChangedFunc func(qsv1a1.QuarksSecret) bool

QuarksSecretChangedFunc returns true if something changed in the quarks secret

Jump to

Keyboard shortcuts

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