ginkgo_util

package
v1.19.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvNoCleanup        = "M_NO_CLEANUP"
	ImagePullSecretName = "imagepullsecret"
)

Variables

This section is empty.

Functions

func CreateTestFile added in v1.14.0

func CreateTestFile(dcYaml string) (string, error)

Utility function to override the server config in a spec file. This will copy the provided yaml spec to a temp file, replacing or adding the supplied server overrides, to allow for running tests against mutliple Cassandra/DSE versions.

func CreateTestJson added in v1.14.0

func CreateTestJson(jsonString string) string

func CreateTestSecretsConfig added in v1.14.0

func CreateTestSecretsConfig(configFile string) (string, error)

func GetCassandraConfigYamlLocation added in v1.14.0

func GetCassandraConfigYamlLocation() string

Types

type NodetoolNodeInfo

type NodetoolNodeInfo struct {
	Status  string
	State   string
	Address string
	HostId  string
	Rack    string
}

type NsWrapper

type NsWrapper struct {
	Namespace     string
	TestSuiteName string
	LogDir        string
	// contains filtered or unexported fields
}

Wrapper type to make it simpler to set a namespace one time and execute all of your KCmd objects inside of it, and then use Gomega assertions on panic

func NewWrapper

func NewWrapper(suiteName string, namespace string) NsWrapper

func (*NsWrapper) CheckForCassandraTasks added in v1.13.0

func (ns *NsWrapper) CheckForCassandraTasks(dcName, command string, completed bool, count int)

func (NsWrapper) CqlExecute

func (ns NsWrapper) CqlExecute(podName string, stepDesc string, cql string, user string, pw string)

func (*NsWrapper) DisableGossip

func (ns *NsWrapper) DisableGossip(podName string)

func (*NsWrapper) DisableGossipWaitNotReady

func (ns *NsWrapper) DisableGossipWaitNotReady(podName string)

func (*NsWrapper) EnableGossip

func (ns *NsWrapper) EnableGossip(podName string)

func (*NsWrapper) EnableGossipWaitReady

func (ns *NsWrapper) EnableGossipWaitReady(podName string)

func (*NsWrapper) ExecAndLog

func (ns *NsWrapper) ExecAndLog(description string, kcmd kubectl.KCmd)

func (*NsWrapper) ExecAndLogAndExpectErrorString

func (ns *NsWrapper) ExecAndLogAndExpectErrorString(description string, kcmd kubectl.KCmd, expectedError string)

func (NsWrapper) ExecV

func (k NsWrapper) ExecV(kcmd kubectl.KCmd) error

ExecV runs KCmd via `kubectl` in the namspace (the receiver), where KCmd is a struct holding the kubectl command to run (not including `kubectl` itself), the args, and any flags. Returns error only (no capture of results) and also logs logs output.

func (NsWrapper) ExecVCapture

func (k NsWrapper) ExecVCapture(kcmd kubectl.KCmd) (string, string, error)

ExecVCapture runs KCmd via `kubectl` in the namspace (the receiver), where KCmd is a struct holding the kubectl command to run (not including `kubectl` itself), the args, and any flags. Returns (stdout, stderr, error) and also logs logs output.

func (NsWrapper) ExecVPanic

func (k NsWrapper) ExecVPanic(kcmd kubectl.KCmd)

func (*NsWrapper) ExpectDatacenterNameStatusUpdated added in v1.10.6

func (ns *NsWrapper) ExpectDatacenterNameStatusUpdated(dcName, dcNameOverride string)

func (NsWrapper) ExpectDoneReconciling

func (ns NsWrapper) ExpectDoneReconciling(dcName string)

func (NsWrapper) ExpectKeyValue

func (ns NsWrapper) ExpectKeyValue(m map[string]interface{}, key string, expectedValue string)

Note that the actual value will be cast to a string before the comparison with the expectedValue

func (NsWrapper) ExpectKeyValues

func (ns NsWrapper) ExpectKeyValues(actual map[string]interface{}, expected map[string]string)

Compare all key/values from an expected map to an actual map

func (*NsWrapper) GetCassandraContainerImages

func (ns *NsWrapper) GetCassandraContainerImages(dcName string) []string

func (*NsWrapper) GetDatacenterPodNames

func (ns *NsWrapper) GetDatacenterPodNames(dcName string) []string

func (*NsWrapper) GetDatacenterReadyPodNames

func (ns *NsWrapper) GetDatacenterReadyPodNames(dcName string) []string

func (*NsWrapper) GetNodeStatusesHostIds

func (ns *NsWrapper) GetNodeStatusesHostIds(dcName string) []string

func (*NsWrapper) Log added in v1.11.0

func (ns *NsWrapper) Log(step string)

func (NsWrapper) Output

func (k NsWrapper) Output(kcmd kubectl.KCmd) (string, error)

func (*NsWrapper) OutputAndLog

func (ns *NsWrapper) OutputAndLog(description string, kcmd kubectl.KCmd) string

func (NsWrapper) OutputPanic

func (k NsWrapper) OutputPanic(kcmd kubectl.KCmd) string

func (NsWrapper) RetrieveStatusFromNodetool

func (ns NsWrapper) RetrieveStatusFromNodetool(podName string) []NodetoolNodeInfo

func (NsWrapper) RetrieveSuperuserCreds

func (ns NsWrapper) RetrieveSuperuserCreds(clusterName string) (string, string)

func (NsWrapper) Terminate

func (ns NsWrapper) Terminate()

func (*NsWrapper) WaitForCassandraImages

func (ns *NsWrapper) WaitForCassandraImages(dcName string, expectedImages []string, timeout int)

func (*NsWrapper) WaitForCompleteTask added in v1.10.6

func (ns *NsWrapper) WaitForCompleteTask(taskName string)

func (*NsWrapper) WaitForCompletedCassandraTasks added in v1.10.6

func (ns *NsWrapper) WaitForCompletedCassandraTasks(dcName, command string, count int)

func (*NsWrapper) WaitForDatacenterCondition

func (ns *NsWrapper) WaitForDatacenterCondition(dcName string, conditionType string, value string)

func (*NsWrapper) WaitForDatacenterConditionWithReason

func (ns *NsWrapper) WaitForDatacenterConditionWithReason(dcName string, conditionType string, value string, reason string)

func (*NsWrapper) WaitForDatacenterConditionWithTimeout

func (ns *NsWrapper) WaitForDatacenterConditionWithTimeout(dcName, conditionType, value string, seconds int)

func (*NsWrapper) WaitForDatacenterOperatorProgress

func (ns *NsWrapper) WaitForDatacenterOperatorProgress(dcName string, progressValue string, timeout int)

func (*NsWrapper) WaitForDatacenterReady

func (ns *NsWrapper) WaitForDatacenterReady(dcName string)

func (*NsWrapper) WaitForDatacenterReadyPodCount

func (ns *NsWrapper) WaitForDatacenterReadyPodCount(dcName string, count int)

func (*NsWrapper) WaitForDatacenterReadyPodCountWithTimeout

func (ns *NsWrapper) WaitForDatacenterReadyPodCountWithTimeout(dcName string, count int, podCountTimeout int)

func (*NsWrapper) WaitForDatacenterReadyWithTimeouts

func (ns *NsWrapper) WaitForDatacenterReadyWithTimeouts(dcName string, podCountTimeout int, dcReadyTimeout int)

func (*NsWrapper) WaitForDatacenterToHaveNoPods

func (ns *NsWrapper) WaitForDatacenterToHaveNoPods(dcName string)

func (*NsWrapper) WaitForOperatorReady

func (ns *NsWrapper) WaitForOperatorReady()

func (NsWrapper) WaitForOutput

func (k NsWrapper) WaitForOutput(kcmd kubectl.KCmd, expected string, seconds int) error

func (*NsWrapper) WaitForOutputAndLog

func (ns *NsWrapper) WaitForOutputAndLog(description string, kcmd kubectl.KCmd, expected string, seconds int)

func (NsWrapper) WaitForOutputContains

func (k NsWrapper) WaitForOutputContains(kcmd kubectl.KCmd, expected string, seconds int) error

func (*NsWrapper) WaitForOutputContainsAndLog

func (ns *NsWrapper) WaitForOutputContainsAndLog(description string, kcmd kubectl.KCmd, expected string, seconds int)

func (NsWrapper) WaitForOutputContainsPanic

func (k NsWrapper) WaitForOutputContainsPanic(kcmd kubectl.KCmd, expected string, seconds int)

func (NsWrapper) WaitForOutputPanic

func (k NsWrapper) WaitForOutputPanic(kcmd kubectl.KCmd, expected string, seconds int)

func (NsWrapper) WaitForOutputPattern

func (k NsWrapper) WaitForOutputPattern(kcmd kubectl.KCmd, pattern string, seconds int) error

func (*NsWrapper) WaitForOutputPatternAndLog

func (ns *NsWrapper) WaitForOutputPatternAndLog(description string, kcmd kubectl.KCmd, expected string, seconds int)

func (*NsWrapper) WaitForPodNotStarted

func (ns *NsWrapper) WaitForPodNotStarted(podName string)

func (*NsWrapper) WaitForPodStarted

func (ns *NsWrapper) WaitForPodStarted(podName string)

func (*NsWrapper) WaitForSuperUserUpserted

func (ns *NsWrapper) WaitForSuperUserUpserted(dcName string, timeout int)

Jump to

Keyboard shortcuts

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