Use interfaces when testing conditions so we don't need versioned methods#1120
Conversation
|
hmm |
| // DEPRECATED: Use versioned test helper | ||
| func CheckCondition(s *duckv1b1.Status, c apis.ConditionType, cs corev1.ConditionStatus) error { | ||
| cond := s.GetCondition(c) | ||
| func CheckCondition(a apis.ConditionAccessor, c apis.ConditionType, cs corev1.ConditionStatus) error { |
There was a problem hiding this comment.
Why not use the condtionManager interface?
There was a problem hiding this comment.
That interface is huge for what these helpers need
There was a problem hiding this comment.
secondly we're passing duck.Status types here
There was a problem hiding this comment.
You might also want gettoplevel in the new interface
There was a problem hiding this comment.
duck.Status doesn't have that method so don't want to add it
|
|
|
|
|
|
|
|
|
@n3wscott PTAL again |
|
/assign @n3wscott |
|
/lgtm |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dprotaso, n3wscott The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Downstream PRs