Documentation
¶
Overview ¶
Package utils contains helper functions/methods for e2e
Index ¶
- func FirstEndpointSliceIP(endpoint *discoveryv1.EndpointSlice) string
- func ForgeArchiveWalOnObjectStore(namespace, clusterName, clientRef, existingWALName, newWALName string) error
- func GetEndpointSliceByServiceName(ctx context.Context, crudClient client.Client, namespace, serviceName string) (*discoveryv1.EndpointSlice, error)
- func PrintClusterResources(ctx context.Context, crudClient client.Client, namespace, clusterName string) string
- func TestDirectoryEmpty(namespace, podName, directoryPath string) bool
- func TestFileExist(namespace, podName, directoryPath, fileName string) bool
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 ForgeArchiveWalOnObjectStore ¶
func ForgeArchiveWalOnObjectStore(namespace, clusterName, clientRef, existingWALName, newWALName string) error
ForgeArchiveWalOnObjectStore instead of using `switchWalCmd` to generate a real WAL archive, directly forges a WAL archive file on the object store 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 ¶
TestDirectoryEmpty tests if a directory `directoryPath` exists on pod `podName` in namespace `namespace`
func TestFileExist ¶
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 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 objectstore contains the functions to deploy the S3-compatible object storage service used by the e2e tests (currently RustFS) and to query it through an AWS CLI client pod
|
Package objectstore contains the functions to deploy the S3-compatible object storage service used by the e2e tests (currently RustFS) and to query it through an AWS CLI client pod |
|
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 |