Documentation
¶
Overview ¶
Package testutil provides shared helpers for operator E2E tests.
Index ¶
- func CheckPodsReady(ctx context.Context, c client.Client, namespace string, ...) error
- func CreateNodePortService(ctx context.Context, c client.Client, serverName, namespace string)
- func DeployParameterizedOIDCServer(ctx context.Context, c client.Client, name, namespace string, ...) (issuerURL string, allocatedNodePort int32, cleanup func())
- func GetNodePort(ctx context.Context, c client.Client, serviceName, namespace string, ...) int32
- func GetPodLogs(ctx context.Context, namespace, podName, containerName string, previous bool) (string, error)
- func WaitForMCPServerRunning(ctx context.Context, c client.Client, name, namespace string, ...)
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 ¶
CreateNodePortService creates a NodePort service targeting the MCPServer proxy pods.
func DeployParameterizedOIDCServer ¶ added in v0.18.0
func DeployParameterizedOIDCServer( ctx context.Context, c client.Client, name, namespace string, timeout, pollingInterval time.Duration, ) (issuerURL string, allocatedNodePort int32, cleanup func())
DeployParameterizedOIDCServer deploys an in-cluster mock OIDC server that issues RSA-signed JWTs with a caller-controlled subject claim (via POST /token?subject=<name>). The server is exposed via a NodePort so the test process (running outside the cluster) can reach it.
Returns the in-cluster issuer URL (http://<name>.<namespace>.svc.cluster.local) and a cleanup function that removes all created resources.
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.
Types ¶
This section is empty.