Documentation ¶
Index ¶
- func BuildMatchersFromExpected(ipLists []project.IPAccessList) []types.GomegaMatcher
- func FindConditionByType(conditions []status.Condition, conditionType status.ConditionType) (status.Condition, bool)
- func MatchCondition(expected status.Condition) types.GomegaMatcher
- func MatchConditions(expected ...status.Condition) []types.GomegaMatcher
- func MatchIPAccessList(expected project.IPAccessList) types.GomegaMatcher
- func ReadAtlasResource(k8sClient client.Client, createdResource mdbv1.AtlasCustomResource) bool
- func WaitFor(k8sClient client.Client, createdResource mdbv1.AtlasCustomResource, ...) func() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildMatchersFromExpected ¶
func BuildMatchersFromExpected(ipLists []project.IPAccessList) []types.GomegaMatcher
func FindConditionByType ¶
func MatchCondition ¶
func MatchCondition(expected status.Condition) types.GomegaMatcher
MatchCondition returns the GomegaMatcher that checks if the 'actual' status.Condition matches the 'expected' one.
func MatchConditions ¶
func MatchConditions(expected ...status.Condition) []types.GomegaMatcher
MatchConditions is a convenience method that allows to create the range of matchers simplifying testing
func MatchIPAccessList ¶
func MatchIPAccessList(expected project.IPAccessList) types.GomegaMatcher
MatchIPAccessList returns the GomegaMatcher that checks if the 'actual' mongodbatlas.ProjectIPAccessList matches the 'expected' mdbv1.ProjectIPAccessList one. Note, that we cannot compare them by all the fields as Atlas tends to set default fields after IPAccessList creation so we need to compare only the fields that the Operator has set
func ReadAtlasResource ¶
func ReadAtlasResource(k8sClient client.Client, createdResource mdbv1.AtlasCustomResource) bool
func WaitFor ¶
func WaitFor(k8sClient client.Client, createdResource mdbv1.AtlasCustomResource, expectedCondition status.Condition, check ...func(mdbv1.AtlasCustomResource)) func() bool
WaitFor waits until the AO Custom Resource reaches some state - this is configured by 'expectedCondition'. It's possible to specify optional callbacks to check the state of the object if it hasn't reached the expected condition. This allows to validate the object in case it's in "pending" phase.
Types ¶
This section is empty.