Documentation
¶
Index ¶
- func MatchCondition(con *Condition) types.GomegaMatcher
- func MaybeMatch(matcher types.GomegaMatcher) types.GomegaMatcher
- type Condition
- func (c *Condition) Matches(other *Condition) bool
- func (c *Condition) String() string
- func (c *Condition) ToCondition() metav1.Condition
- func (c *Condition) WithLastTransitionTime(timestamp metav1.Time) *Condition
- func (c *Condition) WithMessage(message string) *Condition
- func (c *Condition) WithObservedGeneration(observedGeneration int64) *Condition
- func (c *Condition) WithReason(reason string) *Condition
- func (c *Condition) WithStatus(status metav1.ConditionStatus) *Condition
- func (c *Condition) WithTimestampTolerance(t time.Duration) *Condition
- func (c *Condition) WithType(conType string) *Condition
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MatchCondition ¶
func MatchCondition(con *Condition) types.GomegaMatcher
MatchCondition returns a Gomega matcher that checks if a Condition is equal to the expected one. If the passed in 'actual' is not a Condition, the matcher will fail. All fields which are set to their zero value in the expected condition will be ignored. Use one of the TestCondition... constructors to create a Condition that can be used with this matcher.
func MaybeMatch ¶ added in v0.12.0
func MaybeMatch(matcher types.GomegaMatcher) types.GomegaMatcher
MaybeMatch returns a Gomega matcher that passes the matching logic to the provided matcher, but always succeeds if the passed in matcher is nil.
Types ¶
type Condition ¶ added in v0.13.0
type Condition struct {
// contains filtered or unexported fields
}
func TestCondition ¶ added in v0.13.0
func TestCondition() *Condition
func TestConditionFromCondition ¶ added in v0.13.0
func TestConditionFromValues ¶ added in v0.13.0
func (*Condition) Matches ¶ added in v0.13.0
Matches checks if the current Condition matches the other Condition. Note that this method is not symmetrical, meaning that a.Matches(b) may yield a different result than b.Matches(a). The reason for this is that nil fields in the receiver Condition are considered "arbitrary" and will match any value in the other Condition. If both Conditions are nil, they match.
func (*Condition) ToCondition ¶ added in v0.13.0
func (*Condition) WithLastTransitionTime ¶ added in v0.13.0
func (*Condition) WithMessage ¶ added in v0.13.0
func (*Condition) WithObservedGeneration ¶ added in v0.13.0
func (*Condition) WithReason ¶ added in v0.13.0
func (*Condition) WithStatus ¶ added in v0.13.0
func (c *Condition) WithStatus(status metav1.ConditionStatus) *Condition