test

package
v0.0.0-...-c9092c5 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PollInterval is how frequently e2e tests will poll for updates.
	PollInterval = 1 * time.Second
	// PollTimeout is how long e2e tests will wait for resource updates when polling.
	PollTimeout = 10 * time.Minute
)
View Source
const (
	// ServingNamespace is the default namespace for serving e2e tests
	ServingNamespace = "serving-tests"
)

Variables

View Source
var ObjectNameForTest = helpers.ObjectNameForTest

ObjectNameForTest generates a random object name based on the test name.

Functions

func ListenAndServeGracefully

func ListenAndServeGracefully(addr string, handler func(w http.ResponseWriter, r *http.Request))

ListenAndServeGracefully calls into ListenAndServeGracefullyWithPattern by passing handler to handle requests for "/"

func ListenAndServeGracefullyWithHandler

func ListenAndServeGracefullyWithHandler(addr string, handler http.Handler)

ListenAndServeGracefullyWithHandler creates an HTTP server, listens on the defined address and handles incoming requests with the given handler. It blocks until SIGTERM is received and the underlying server has shutdown gracefully.

Types

type Clients

type Clients struct {
	KubeClient       kubernetes.Interface
	GatewayAPIClient *GatewayAPIClients
	Dynamic          dynamic.Interface
}

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

func NewClientsFromConfig

func NewClientsFromConfig(cfg *rest.Config, namespace string) (*Clients, error)

NewClientsFromConfig instantiates and returns several clientsets required for making request to the Knative Serving cluster specified by the combination of clusterName and configPath. Clients can make requests within namespace.

func Setup

func Setup(t testing.TB) *Clients

Setup creates client to run Knative Service requests

type GatewayAPIClients

type GatewayAPIClients struct {
	HTTPRoutes gwv1alpha1.HTTPRouteInterface
}

GatewayAPIClients holds instances of interfaces for making requests to Knative networking clients.

Directories

Path Synopsis
conformance

Jump to

Keyboard shortcuts

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