testutil

package
v0.17.0 Latest Latest
Warning

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

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

Documentation

Overview

Package testutil provides shared helpers for operator E2E tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPodsReady

func CheckPodsReady(ctx context.Context, c client.Client, namespace string, labels map[string]string) error

CheckPodsReady checks that at least one pod matching the given labels is running and ready.

func CreateNodePortService

func CreateNodePortService(ctx context.Context, c client.Client, serverName, namespace string)

CreateNodePortService creates a NodePort service targeting the MCPServer proxy pods.

func GetNodePort

func GetNodePort(
	ctx context.Context,
	c client.Client,
	serviceName, namespace string,
	timeout, pollingInterval time.Duration,
) int32

GetNodePort waits for a NodePort service to get a port assigned and returns it.

func GetPodLogs

func GetPodLogs(ctx context.Context, namespace, podName, containerName string, previous bool) (string, error)

GetPodLogs retrieves logs from a specific pod container.

func WaitForMCPServerRunning

func WaitForMCPServerRunning(
	ctx context.Context,
	c client.Client,
	name, namespace string,
	timeout, pollingInterval time.Duration,
)

WaitForMCPServerRunning waits for an MCPServer to reach the Running phase.

Types

This section is empty.

Jump to

Keyboard shortcuts

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