Documentation ¶
Index ¶
- Constants
- Variables
- func GetAllNodesForAllPodSets(pods []*provider.Pod) (nodes map[string]bool)
- func WaitForAllPodSetsReady(env *provider.TestEnvironment, timeout time.Duration, logger *log.Logger) (notReadyDeployments []*provider.Deployment, ...)
- func WaitForStatefulSetReady(ns, name string, timeout time.Duration, logger *log.Logger) bool
Constants ¶
View Source
const ( ReplicaSetString = "ReplicaSet" StatefulsetString = "StatefulSet" )
Variables ¶
View Source
var WaitForDeploymentSetReady = func(ns, name string, timeout time.Duration, logger *log.Logger) bool { logger.Info("Check if Deployment %s:%s is ready", ns, name) clients := clientsholder.GetClientsHolder() start := time.Now() for time.Since(start) < timeout { dp, err := provider.GetUpdatedDeployment(clients.K8sClient.AppsV1(), ns, name) if err != nil { logger.Error("Error while getting Deployment %q, err: %v", name, err) } else if !dp.IsDeploymentReady() { logger.Warn("Deployment %q is not ready yet", dp.ToString()) } else { logger.Info("Deployment %q is ready!", dp.ToString()) return true } time.Sleep(time.Second) } logger.Error("Deployment %s:%s is not ready", ns, name) return false }
View Source
var WaitForScalingToComplete = func(ns, name string, timeout time.Duration, groupResourceSchema schema.GroupResource, logger *log.Logger) bool { logger.Info("Check if scale object for CRs %s:%s is ready", ns, name) clients := clientsholder.GetClientsHolder() start := time.Now() for time.Since(start) < timeout { crScale, err := provider.GetUpdatedCrObject(clients.ScalingClient, ns, name, groupResourceSchema) if err != nil { logger.Error("Error while getting the scaling fields %v", err) } else if !crScale.IsScaleObjectReady() { logger.Warn("%s is not ready yet", crScale.ToString()) } else { logger.Info("%s is ready!", crScale.ToString()) return true } time.Sleep(time.Second) } logger.Error("Timeout waiting for CR %s:%s scaling to be complete", ns, name) return false }
Functions ¶
func WaitForAllPodSetsReady ¶
func WaitForAllPodSetsReady(env *provider.TestEnvironment, timeout time.Duration, logger *log.Logger) ( notReadyDeployments []*provider.Deployment, notReadyStatefulSets []*provider.StatefulSet)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.