steps

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Info    = Color("\033[1;33m%s\033[0m")
	Outline = Color("\033[1;34m%s\033[0m")
	Step    = Color("\033[1;36m%s\033[0m")
	Success = Color("\033[1;32m%s\033[0m")
)

Functions

func CancelRepair

func CancelRepair(t *testing.T, repairId uuid.UUID)

func CheckClusterExpectedResources

func CheckClusterExpectedResources(t *testing.T, namespace string)

func CheckClusterIsRegisteredInReaper

func CheckClusterIsRegisteredInReaper(t *testing.T, clusterName string)

func CheckGrafanaIsReachable

func CheckGrafanaIsReachable(t *testing.T)

func CheckK8sClusterIsReachable

func CheckK8sClusterIsReachable(t *testing.T)

func CheckKeyspaceExists

func CheckKeyspaceExists(t *testing.T, namespace, keyspace string)

func CheckLastRestoreFileContainsKey added in v1.4.0

func CheckLastRestoreFileContainsKey(t *testing.T, namespace string)

func CheckLastRestoreFilePresence added in v1.4.0

func CheckLastRestoreFilePresence(t *testing.T, namespace string)

func CheckNamespaceIsAbsent

func CheckNamespaceIsAbsent(t *testing.T, namespace string)

func CheckNamespaceWasCreated

func CheckNamespaceWasCreated(t *testing.T, namespace string)

func CheckNoOutOfOrderMetrics added in v1.3.2

func CheckNoOutOfOrderMetrics(t *testing.T, namespace string)

func CheckPrometheusActiveTargets

func CheckPrometheusActiveTargets(t *testing.T, expectedTargets int)

Monitoring related functions

func CheckPrometheusMetricExtraction

func CheckPrometheusMetricExtraction(t *testing.T)

func CheckResourceWithLabelsIsPresent added in v1.2.0

func CheckResourceWithLabelsIsPresent(t *testing.T, namespace, resourceType string, labels map[string]string)

func CheckRowCountInTable

func CheckRowCountInTable(t *testing.T, nbRows int, namespace, tableName, keyspaceName string)

func CheckSecretIsPresent

func CheckSecretIsPresent(t *testing.T, namespace, secret string)

func CheckStargateDocumentExists

func CheckStargateDocumentExists(t *testing.T, token, docNamespace, documentId string)

func CheckTableLevelMetricsArePresent added in v1.3.3

func CheckTableLevelMetricsArePresent(t *testing.T)

func Color

func Color(colorString string) func(...interface{}) string

func CountMonitoredItems

func CountMonitoredItems(t *testing.T, namespace string) int

func CountPodsWithLabels added in v1.2.0

func CountPodsWithLabels(t *testing.T, namespace string, labels map[string]string) int

func CreateCassandraTable

func CreateCassandraTable(t *testing.T, namespace, tableName, keyspaceName string)

func CreateMedusaSecretWithFile

func CreateMedusaSecretWithFile(t *testing.T, namespace, secretFile string)

func CreateNamespace

func CreateNamespace(t *testing.T) string

func CreateStargateDocumentNamespace

func CreateStargateDocumentNamespace(t *testing.T, token string) string

func DeleteNamespace

func DeleteNamespace(t *testing.T, namespace string)

func DeployClusterWithValues

func DeployClusterWithValues(t *testing.T, namespace, medusaBackend, customValues string, nodes int, upgrade bool, useLocalCharts bool, version string)

func DeployMinioAndCreateBucket

func DeployMinioAndCreateBucket(t *testing.T, bucketName string)

func ExtractUsernamePassword

func ExtractUsernamePassword(t *testing.T, secretName, namespace string) credentials

func Find

func Find(slice []string, val string) bool

Find returns true if val exists in the slice array, false otherwise

func GenerateStargateAuthToken

func GenerateStargateAuthToken(t *testing.T, namespace string) string

func GetNamespace added in v1.2.0

func GetNamespace(name string) (*v1.Namespace, error)

func GetPodsWithLabels added in v1.3.2

func GetPodsWithLabels(t *testing.T, namespace string, labels map[string]string) *v1.PodList

func InitTestClient added in v1.2.0

func InitTestClient() error

InitTestClient initializes a controller-runtime client. This is a no-op if it has already been called. It should be called prior to any test execution.

func InstallTraefik

func InstallTraefik(t *testing.T)

func LoadRowsInTable

func LoadRowsInTable(t *testing.T, nbRows int, namespace, tableName, keyspaceName string)

func MinioServiceName

func MinioServiceName(t *testing.T) string

func PerformBackup

func PerformBackup(t *testing.T, namespace, backupName string, useLocalCharts bool)

func PodWithLabelsIsReady added in v1.2.0

func PodWithLabelsIsReady(t *testing.T, namespace string, label map[string]string) bool

func RestartStargate added in v1.2.0

func RestartStargate(t *testing.T, releaseName, dcName, namespace string)

RestartStargate scales the Stargate deployment down to zero and then scales it back up to the prior number of replicas. This function blocks until the deployment is ready.

func RestoreBackup

func RestoreBackup(t *testing.T, namespace, backupName string)

func RunShellCommand

func RunShellCommand(command *exec.Cmd) error

func RunShellCommandAndGetOutput

func RunShellCommandAndGetOutput(command *exec.Cmd) string

func StargateService

func StargateService(t *testing.T, namespace string) (v1.Service, error)

Stargate related functions

func TriggerRepair

func TriggerRepair(t *testing.T, clusterName, keyspace, owner string) uuid.UUID

TriggerRepair starts a repair on keyspace and return the repair id

func UninstallHelmReleaseAndNamespace added in v1.3.0

func UninstallHelmReleaseAndNamespace(t *testing.T, helmReleaseName, namespace string)

func WaitForAuthEndpoint

func WaitForAuthEndpoint(t *testing.T)

func WaitForCassDcToBeReady

func WaitForCassDcToBeReady(t *testing.T, namespace string)

func WaitForCassDcToBeUpdating

func WaitForCassDcToBeUpdating(t *testing.T, namespace string)

func WaitForCassandraDatacenterDeletion

func WaitForCassandraDatacenterDeletion(t *testing.T, namespace string)

func WaitForDeploymentReady added in v1.2.0

func WaitForDeploymentReady(t *testing.T, key types.NamespacedName, retryInterval, timeout time.Duration) bool

WaitForDeploymentReady Polls the deployment status until the Deployment is ready. Readiness is defined as .Status.Replicas == .Status.ReadyReplicas.

func WaitForOneSegmentToBeDone

func WaitForOneSegmentToBeDone(t *testing.T, repairId uuid.UUID)

func WaitForPodWithLabelsToBeReady added in v1.2.0

func WaitForPodWithLabelsToBeReady(t *testing.T, namespace string, labels map[string]string)

func WaitForReaperPod

func WaitForReaperPod(t *testing.T, namespace string)

func WaitForStargatePodReady

func WaitForStargatePodReady(t *testing.T, namespace string)

func WriteStargateDocument

func WriteStargateDocument(t *testing.T, token, docNamespace string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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