utils

package
v1.28.0-rc2 Latest Latest
Warning

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

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

Documentation

Overview

Package utils contains helper functions/methods for e2e

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FirstEndpointSliceIP added in v1.25.3

func FirstEndpointSliceIP(endpoint *discoveryv1.EndpointSlice) string

FirstEndpointSliceIP returns the IP of the first Address in the EndpointSlice

func ForgeArchiveWalOnMinio

func ForgeArchiveWalOnMinio(namespace, clusterName, miniClientPodName, existingWALName, newWALName string) error

ForgeArchiveWalOnMinio instead of using `switchWalCmd` to generate a real WAL archive, directly forges a WAL archive file on Minio by copying and renaming an existing WAL archive file for the sake of more control of testing. To make sure the forged one won't be a real WAL archive, we let the sequence in newWALName to be big enough so that it can't be a real WAL archive name in an idle postgresql.

func GetEndpointSliceByServiceName added in v1.25.3

func GetEndpointSliceByServiceName(
	ctx context.Context,
	crudClient client.Client,
	namespace, serviceName string,
) (*discoveryv1.EndpointSlice, error)

GetEndpointSliceByServiceName returns the EndpointSlice for a given service name in a given namespace

func PrintClusterResources added in v1.18.0

func PrintClusterResources(ctx context.Context, crudClient client.Client, namespace, clusterName string) string

PrintClusterResources prints a summary of the cluster pods, jobs, pvcs etc.

func TestDirectoryEmpty

func TestDirectoryEmpty(namespace, podName, directoryPath string) bool

TestDirectoryEmpty tests if a directory `directoryPath` exists on pod `podName` in namespace `namespace`

func TestFileExist

func TestFileExist(namespace, podName, directoryPath, fileName string) bool

TestFileExist tests if a file specified with `fileName` exist under directory `directoryPath`, on pod `podName` in namespace `namespace`

Types

This section is empty.

Directories

Path Synopsis
Package backups provides backup utilities
Package backups provides backup utilities
Package cloudvendors provides the variables to define on which cloud vendor the e2e test is running
Package cloudvendors provides the variables to define on which cloud vendor the e2e test is running
Package clusterutils provides functions to handle cluster actions
Package clusterutils provides functions to handle cluster actions
Package deployments contains functions to control deployments
Package deployments contains functions to control deployments
Package environment contains functions to handle the TestingEnvironment struct
Package environment contains functions to handle the TestingEnvironment struct
Package envsubst manage the replacemes of env variables in a file
Package envsubst manage the replacemes of env variables in a file
Package exec provides functions to execute commands inside pods or from local
Package exec provides functions to execute commands inside pods or from local
Package fencing provides functions to manage the fencing on cnpg clusters
Package fencing provides functions to manage the fencing on cnpg clusters
Package forwardconnection provides an easy interface to create a port forward from the local test to a service or pod inside the testing k8s cluster
Package forwardconnection provides an easy interface to create a port forward from the local test to a service or pod inside the testing k8s cluster
Package importdb contains the functions to import a database
Package importdb contains the functions to import a database
Package logs provides a way to parse and get the logs of a pod
Package logs provides a way to parse and get the logs of a pod
Package minio contains all the require functions to setup a MinIO deployment and query this MinIO deployment using the MinIO API
Package minio contains all the require functions to setup a MinIO deployment and query this MinIO deployment using the MinIO API
Package namespaces provides utilities to manage namespaces
Package namespaces provides utilities to manage namespaces
Package nodes contains the helper methods/functions for nodes
Package nodes contains the helper methods/functions for nodes
Package objects provides functions to manage pure objects in Kubernetes
Package objects provides functions to manage pure objects in Kubernetes
Package openshift provides functions to work with OLM CRDs
Package openshift provides functions to work with OLM CRDs
Package operator provides functions to handle and manage the operator
Package operator provides functions to handle and manage the operator
Package pods provides pod utilities to manage pods inside K8s
Package pods provides pod utilities to manage pods inside K8s
Package postgres provides functions to handle postgres in cnpg clusters
Package postgres provides functions to handle postgres in cnpg clusters
Package proxy provides functions to use the proxy subresource to call a pod
Package proxy provides functions to use the proxy subresource to call a pod
Package replicationslot provides functions to manage the replication slot of a cnpg cluster
Package replicationslot provides functions to manage the replication slot of a cnpg cluster
Package run contains functions to execute commands locally
Package run contains functions to execute commands locally
Package secrets provides functions to manage and handle secrets
Package secrets provides functions to manage and handle secrets
Package services provides functions tomanage services inside K8s
Package services provides functions tomanage services inside K8s
Package sternmultitailer handle the logs of every pod in the tests saving them in a structured way within a directory.
Package sternmultitailer handle the logs of every pod in the tests saving them in a structured way within a directory.
Package storage provides functions to manage enything related to storage
Package storage provides functions to manage enything related to storage
Package timeouts contains the timeouts for the E2E test suite
Package timeouts contains the timeouts for the E2E test suite
Package yaml provides functions to handle yaml files
Package yaml provides functions to handle yaml files

Jump to

Keyboard shortcuts

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