e2eutil

package
v1.1.2-release Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2021 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RetryInterval        = time.Second * 10
	Timeout              = time.Second * 600
	CleanupRetryInterval = time.Second * 5
	CleanupTimeout       = time.Second * 20
)

Functions

func ExecPod

func ExecPod(f *framework.Framework, namespace string, pod *corev1.Pod, cmd []string) (string, string,
	error)

func ExecPodFromName

func ExecPodFromName(t *testing.T, f *framework.Framework, namespace string, podName string, cmd string) (string,
	string, error)

func HelperInitCassandraConfigMap

func HelperInitCassandraConfigMap(t *testing.T, f *framework.Framework, ctx *framework.TestCtx, configMapName, namespace string)

func HelperInitCluster

func HelperInitCluster(t *testing.T, f *framework.Framework, ctx *framework.TestCtx, name, namespace string) *api.CassandraCluster

HelperInitCluster goal is to create objects from the testdata/file.yaml pointed by name. for now we can create Secret or CassandraCluster, we may add more objects in futur if needed

func HelperInitOperator

func HelperInitOperator(t *testing.T) (*framework.Context, *framework.Framework)

func K8sGetCassandraCluster

func K8sGetCassandraCluster(t *testing.T, f *framework.Framework, err error, cc *api.CassandraCluster)

func WaitForPodOperationDone

func WaitForPodOperationDone(t *testing.T, f *framework.Framework, namespace, name string, dcRackName string,
	retryInterval, timeout time.Duration) error

func WaitForStatefulset

func WaitForStatefulset(t *testing.T, kubeclient kubernetes.Interface, namespace, name string, replicas int,
	retryInterval, timeout time.Duration) error

func WaitForStatusChange

func WaitForStatusChange(
	t *testing.T,
	f *framework.Framework,
	namespace string,
	name string,
	retryInterval time.Duration,
	timeout time.Duration,
	conditionFunc CassandraClusterConditionFunc) error

WaitForStatusChange tries a condition func until it returns true, an error, or the timeout is reached. Each invocation of conditionFunc will receive a newly fetched instance of the CassandraCluster.

func WaitForStatusDone

func WaitForStatusDone(t *testing.T, f *framework.Framework, namespace, name string,
	retryInterval, timeout time.Duration) error

Types

type CassandraClusterConditionFunc

type CassandraClusterConditionFunc func(cc *api.CassandraCluster) (bool, error)

Jump to

Keyboard shortcuts

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