Back to godoc.org

Package environment

v1.0.746
Latest Go to latest

The latest major version is .

Published: Oct 9, 2020 | License: Apache-2.0 | Module: code.cloudfoundry.org/quarks-secret

Index

func ApplyCRDs

func ApplyCRDs(kubeConfig *rest.Config) error

ApplyCRDs applies the CRDs to the cluster

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

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

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

GetQuarksSecret gets a QuarksSecret custom resource

func (*Machine) UpdateQuarksSecret

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

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier