utils

package
v0.0.0-...-9796c2c Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNonEmptyLines

func GetNonEmptyLines(output string) []string

GetNonEmptyLines converts given command output string into individual objects according to line breakers, and ignores the empty elements in it.

func GetProjectDir

func GetProjectDir() (string, error)

GetProjectDir will return the directory where the project is

func InstallCSIHostPathDriver

func InstallCSIHostPathDriver() error

InstallCSIHostPathDriver installs the CSI hostpath driver (test driver) and waits for it to become ready. This enables full-path PVC expansion testing in Kind.

func InstallCertManager

func InstallCertManager() error

InstallCertManager installs the cert manager bundle.

func IsCertManagerCRDsInstalled

func IsCertManagerCRDsInstalled() bool

IsCertManagerCRDsInstalled checks if any Cert Manager CRDs are installed by verifying the existence of key CRDs related to Cert Manager.

func IsOpenShiftCluster

func IsOpenShiftCluster() bool

IsOpenShiftCluster returns true if the current cluster serves the OpenShift security API group. This is a lightweight capability check suitable for E2E test gating.

func LoadImageToKindClusterWithName

func LoadImageToKindClusterWithName(imageName string) error

LoadImageToKindClusterWithName loads a local docker image to the kind cluster. If kind fails due missing platform digests on multi-arch image indexes, retry by resolving and pulling the linux/<host-arch> manifest digest, retagging, and loading again.

func Run

func Run(cmd *exec.Cmd) (string, error)

Run executes the provided command within this context

func UncommentCode

func UncommentCode(filename, target, prefix string) error

UncommentCode searches for target in the file and remove the comment prefix of the target content. The target content may span multiple lines.

func UninstallCSIHostPathDriver

func UninstallCSIHostPathDriver()

UninstallCSIHostPathDriver removes the CSI hostpath driver resources (best effort).

func UninstallCertManager

func UninstallCertManager()

UninstallCertManager uninstalls the cert manager

Types

This section is empty.

Jump to

Keyboard shortcuts

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