e2elib

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EnvoyGatewayNamespace is the namespace where the Envoy Gateway is installed.
	EnvoyGatewayNamespace = "envoy-gateway-system"
	// EnvoyGatewayDefaultServicePort is the default service port for the Envoy Gateway.
	EnvoyGatewayDefaultServicePort = 80
)

Variables

This section is empty.

Functions

func Kubectl

func Kubectl(ctx context.Context, args ...string) *exec.Cmd

Kubectl runs the kubectl command with the given context and arguments.

func KubectlApplyManifest

func KubectlApplyManifest(ctx context.Context, manifest string) (err error)

func KubectlApplyManifestStdin

func KubectlApplyManifestStdin(ctx context.Context, manifest string) (err error)

KubectlApplyManifestStdin applies the given manifest using kubectl, reading from stdin.

func KubectlDeleteManifest

func KubectlDeleteManifest(ctx context.Context, manifest string) (err error)

KubectlDeleteManifest deletes the given manifest using kubectl.

func RequireWaitForGatewayPodReady

func RequireWaitForGatewayPodReady(t *testing.T, selector string)

RequireWaitForGatewayPodReady waits for the Envoy Gateway pod with the given selector to be ready.

func RequireWaitForPodReady

func RequireWaitForPodReady(t *testing.T, selector string)

RequireWaitForPodReady waits for the pod with the given selector to be ready.

func TestMain

func TestMain(m *testing.M, aiGatewayHelmFlags []string, inferenceExtension bool)

TestMain is the entry point for the e2e tests. It sets up the kind cluster, installs the Envoy Gateway, and installs the AI Gateway. It can be called with additional flags for the AI Gateway Helm chart.

When the inferenceExtension flag is set to true, it also installs the Inference Extension and the Inference Pool resources, and the Envoy Gateway configuration which are required for the tests.

Types

type PortForwarder

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

PortForwarder is a local port forwarder to a pod.

func RequireNewHTTPPortForwarder

func RequireNewHTTPPortForwarder(t *testing.T, namespace string, selector string, port int) PortForwarder

RequireNewHTTPPortForwarder creates a new port forwarder for the given namespace and selector.

func (PortForwarder) Address

func (f PortForwarder) Address() string

Address returns the address of the port forwarder.

func (PortForwarder) Kill

func (f PortForwarder) Kill()

Kill stops the port forwarder.

Jump to

Keyboard shortcuts

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