testutil

package
v0.0.0-...-46134f2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KubeClient

func KubeClient() (kubernetes.Interface, error)

KubeClient creates a new Kubernetes client using the default kubeconfig.

func LoadKubeSpec

func LoadKubeSpec(filepath string, values map[string]interface{}) (runtime.Object, error)

LoadKubeSpec loads and renders a Kubernetes object from a reader containing valid YAML or JSON specs. The file can contain valid Go text/template code.

func MustTimeoutFromEnv

func MustTimeoutFromEnv(env string) time.Duration

MustTimeoutFromEnv parses the environment variable as a time.Duration, failing if it's not parsable or returning the default timeout if the environment variable is not set.

Types

type Helm

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

func NewHelm

func NewHelm(ns string) Helm

func (Helm) Install

func (h Helm) Install(stdout, stderr io.Writer, name, chart string) error

func (Helm) Uninstall

func (h Helm) Uninstall(stdout, stderr io.Writer, name string) error

type Svcat

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

Svcat wraps the svcat functionality for easier use with the integration tests.

func NewSvcat

func NewSvcat(kubeClient kubernetes.Interface, namespace string) (*Svcat, error)

NewSvcat constructs a new Svcat.

func (*Svcat) Bind

Bind asynchronously binds an instance.

func (*Svcat) Deprovision

func (sc *Svcat) Deprovision(instance *servicecatalogv1beta1.ServiceInstance) error

Deprovision asynchronously deprovisions an instance.

func (*Svcat) Provision

func (sc *Svcat) Provision(
	namespace string,
	serviceName string,
	className string,
	planName string,
	params map[string]interface{},
) (*servicecatalogv1beta1.ServiceInstance, error)

Provision asynchronously provisions an instance.

func (*Svcat) Unbind

func (sc *Svcat) Unbind(instance *servicecatalogv1beta1.ServiceInstance) error

Unbind asynchronously unbinds an instance.

func (*Svcat) WaitBinding

func (sc *Svcat) WaitBinding(binding *servicecatalogv1beta1.ServiceBinding, timeout time.Duration) error

WaitBinding waits for a service binding to be ready.

func (*Svcat) WaitForBroker

func (sc *Svcat) WaitForBroker(
	name string,
	namespace string,
	timeout time.Duration,
) (servicecatalog.Broker, error)

WaitForBroker waits for the broker to be ready.

func (*Svcat) WaitProvisioning

func (sc *Svcat) WaitProvisioning(instance *servicecatalogv1beta1.ServiceInstance, timeout time.Duration) error

WaitProvisioning waits for an instance to be provisioned.

Jump to

Keyboard shortcuts

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