test

package
v0.51.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 11 Imported by: 3 modules, 3 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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.

Ensure required testing namespace exists:

kubectl create namespace knative-operator-testing

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-operator-testing")
	EventingOperatorNamespace = getenv("TEST_EVENTING_NAMESPACE", "knative-eventing")
	// OperatorName is the default operator name for serving operator e2e tests
	OperatorName = getenv("TEST_RESOURCE", "knative")
	// OperatorFlags holds the flags or defaults for knative/operator settings in the user's environment.
	OperatorFlags = initializeOperatorFlags()
)

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 kubernetes.Interface
	Dynamic    dynamic.Interface
	Operator   operatorv1beta1.OperatorV1beta1Interface
	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) KnativeEventing

func (c *Clients) KnativeEventing() operatorv1beta1.KnativeEventingInterface

func (*Clients) KnativeEventingAll

func (c *Clients) KnativeEventingAll() operatorv1beta1.KnativeEventingInterface

func (*Clients) KnativeServing

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

func (*Clients) KnativeServingAll

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

type OperatorEnvironmentFlags added in v0.16.0

type OperatorEnvironmentFlags struct {
	PreviousServingVersion  string // Indicates the previous version of Knative Serving.
	PreviousEventingVersion string // Indicates the previous version of Knative Eventing.
}

OperatorEnvironmentFlags holds the e2e flags needed only by the operator repo.

type ResourceNames

type ResourceNames struct {
	KnativeServing  string
	KnativeEventing 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
y or Y : Canonical URL