test

package
Version: v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

README

Test

This directory contains tests and testing docs for Serving Operator:

Running integration tests

Before running the integration, please make sure you have installed Serving Operator by following the instruction here, and do not install custom resource for operator or knative-serving installed in your cluster.

Create a namespace called knative-serving if it is missing.

kubectl create namespace knative-serving

To run all integration tests:

go test -v -tags=e2e -count=1 ./test/e2e

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ServingOperatorNamespace is the default namespace for serving operator e2e tests
	ServingOperatorNamespace = getenv("TEST_NAMESPACE", "knative-serving")
	// ServingOperatorName is the default operator name for serving operator e2e tests
	ServingOperatorName = getenv("TEST_RESOURCE", "knative-serving")
)

Functions

func CleanupOnInterrupt

func CleanupOnInterrupt(cleanup func())

CleanupOnInterrupt will execute the function cleanup if an interrupt signal is caught

func TearDown

func TearDown(clients *Clients, names ResourceNames)

TearDown will delete created names using clients.

Types

type Clients

type Clients struct {
	KubeClient *test.KubeClient
	Dynamic    dynamic.Interface
	Serving    servingv1alpha1.OperatorV1alpha1Interface
	Config     *rest.Config
}

Clients holds instances of interfaces for making requests to Knative Serving.

func NewClients

func NewClients(configPath string, clusterName string) (*Clients, error)

NewClients instantiates and returns several clientsets required for making request to the Knative Serving cluster specified by the combination of clusterName and configPath.

func (*Clients) KnativeServing

func (c *Clients) KnativeServing() servingv1alpha1.KnativeServingInterface

func (*Clients) KnativeServingAll

func (c *Clients) KnativeServingAll() servingv1alpha1.KnativeServingInterface

type ResourceNames

type ResourceNames struct {
	KnativeServing string
	Namespace      string
}

ResourceNames holds names of various resources.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL