Documentation ¶
Overview ¶
nolint: golint, errcheck
nolint: errcheck,golint
nolint: golint
Index ¶
- func BackupForCluster(cluster *api.MysqlCluster) gomegatypes.GomegaMatcher
- func BackupHaveCondition(condType api.BackupConditionType, status core.ConditionStatus) gomegatypes.GomegaMatcher
- func BackupWithName(name string) gomegatypes.GomegaMatcher
- func DrainChan(requests <-chan reconcile.Request)
- func HaveClusterCond(condType api.ClusterConditionType, status corev1.ConditionStatus) gomegatypes.GomegaMatcher
- func HaveClusterStatusReadyNodes(nodes int) gomegatypes.GomegaMatcher
- func ListAllBackupsFn(c client.Client, options client.ListOption) func() []api.MysqlBackup
- func NewTestLogger(w io.Writer) logr.Logger
- func NodeConditions(master, replicating, lagged, readOnly bool) []api.NodeCondition
- func PodHaveCondition(condType core.PodConditionType, status core.ConditionStatus) gomegatypes.GomegaMatcher
- func RefreshFn(c client.Client, obj client.Object) func() client.Object
- func SetupTestReconcile(inner reconcile.Reconciler) (reconcile.Reconciler, chan reconcile.Request)
- func StartTestManager(mgr manager.Manager) (context.Context, func())
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BackupForCluster ¶
func BackupForCluster(cluster *api.MysqlCluster) gomegatypes.GomegaMatcher
BackupForCluster is gomega matcher that matches a backup which is for given cluster
func BackupHaveCondition ¶
func BackupHaveCondition(condType api.BackupConditionType, status core.ConditionStatus) gomegatypes.GomegaMatcher
BackupHaveCondition is a helper func that returns a matcher to check for an existing condition in condition list list
func BackupWithName ¶ added in v0.2.5
func BackupWithName(name string) gomegatypes.GomegaMatcher
BackupWithName is a gomega matcher that matchers a backup with the given name
func HaveClusterCond ¶ added in v0.5.0
func HaveClusterCond(condType api.ClusterConditionType, status corev1.ConditionStatus) gomegatypes.GomegaMatcher
HaveClusterCond is a helper func that returns a matcher to check for an existing condition in a ClusterCondition list.
func HaveClusterStatusReadyNodes ¶ added in v0.2.5
func HaveClusterStatusReadyNodes(nodes int) gomegatypes.GomegaMatcher
HaveClusterStatusReadyNodes a matcher that checks cluster ready nodes to equal the given value
func ListAllBackupsFn ¶
func ListAllBackupsFn(c client.Client, options client.ListOption) func() []api.MysqlBackup
ListAllBackupsFn returns a helper function that can be used with gomega Eventually and Consistently
func NewTestLogger ¶
NewTestLogger returns a logger good for tests
func NodeConditions ¶
func NodeConditions(master, replicating, lagged, readOnly bool) []api.NodeCondition
NodeConditions returns a list of api.NodeConditions for a node
func PodHaveCondition ¶ added in v0.3.0
func PodHaveCondition(condType core.PodConditionType, status core.ConditionStatus) gomegatypes.GomegaMatcher
PodHaveCondition is a helper func that returns a matcher to check for an existing condition in condition list list
func RefreshFn ¶ added in v0.2.5
RefreshFn receives a client and a runtime.Objects and refreshes the object from k8s example: Eventually(RefreshFn(c, cluster.Unwrap())).Should(HaveClusterStatusReadyNodes(2))
func SetupTestReconcile ¶ added in v0.3.0
func SetupTestReconcile(inner reconcile.Reconciler) (reconcile.Reconciler, chan reconcile.Request)
SetupTestReconcile returns a reconcile.Reconcile implementation that delegates to inner and writes the request to requests after Reconcile is finished.
Types ¶
This section is empty.