framework

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultTimeout = 3 * time.Minute
	DefaultPolling = 2 * time.Second
)

Variables

This section is empty.

Functions

func AssertAllPodsRunning

func AssertAllPodsRunning(g gomega.Gomega, kubeContext, namespace string)

AssertAllPodsRunning checks every non-completed pod in the namespace is Running. Designed for use inside Eventually(func(g Gomega) { ... }).

func AssertJsonpathEquals

func AssertJsonpathEquals(g gomega.Gomega, kubeContext, namespace, resource, name, jsonpath, expected string)

AssertJsonpathEquals checks that a jsonpath value on a resource matches the expected string. Designed for use inside Eventually(func(g Gomega) { ... }).

func AssertResourceExists

func AssertResourceExists(g gomega.Gomega, kubeContext, namespace, resource, name string)

AssertResourceExists checks that a named resource exists in the namespace. Designed for use inside Eventually(func(g Gomega) { ... }).

func Kubectl

func Kubectl(kubeContext string, args ...string) (string, error)

Kubectl executes an arbitrary kubectl command with the given context. Returns trimmed combined output (stdout+stderr) and any error.

func KubectlGet

func KubectlGet(kubeContext, namespace, resource string, extraArgs ...string) (string, error)

KubectlGet runs: kubectl get <resource> -n <namespace> [extraArgs...]

func KubectlGetJsonpath

func KubectlGetJsonpath(kubeContext, namespace, resource, name, jsonpath string) (string, error)

KubectlGetJsonpath runs: kubectl get <resource> <name> -n <namespace> -o jsonpath=<expr>

func KubectlLogs

func KubectlLogs(kubeContext, namespace, labelSelector string, tail int) (string, error)

KubectlLogs runs: kubectl logs -n <namespace> -l <labelSelector> --tail=<tail>

Types

type PodStatus

type PodStatus struct {
	Name     string
	Phase    string
	Restarts string
}

PodStatus holds parsed pod information.

func GetPodStatuses

func GetPodStatuses(kubeContext, namespace string) ([]PodStatus, error)

GetPodStatuses returns the status of all non-completed pods in a namespace. Completed pods (Succeeded/Failed) are filtered out via field-selector so Job pods like the CA-extractor don't cause false failures.

Jump to

Keyboard shortcuts

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