feat: create new ttr for tiertemplate updates#1102
feat: create new ttr for tiertemplate updates#1102mfrancisc merged 16 commits intocodeready-toolchain:masterfrom
Conversation
|
/retest updated host pr |
| // GreaterOrEqual checks if the number of TTRs is greater or equal than the expected one | ||
| func GreaterOrEqual(count int) TierTemplateRevisionWaitCriterion { | ||
| return TierTemplateRevisionWaitCriterion{ | ||
| Match: func(actual []toolchainv1alpha1.TierTemplateRevision) bool { | ||
| return len(actual) >= count | ||
| }, | ||
| Diff: func(actual []toolchainv1alpha1.TierTemplateRevision) string { | ||
| return fmt.Sprintf("number of ttrs %d is not greater or equal than %d \n", len(actual), count) | ||
| }, | ||
| } | ||
| } | ||
|
|
||
| // LessOrEqual checks if the number of TTRs is less or equal than the expected one | ||
| func LessOrEqual(count int) TierTemplateRevisionWaitCriterion { | ||
| return TierTemplateRevisionWaitCriterion{ | ||
| Match: func(actual []toolchainv1alpha1.TierTemplateRevision) bool { | ||
| return len(actual) <= count | ||
| }, | ||
| Diff: func(actual []toolchainv1alpha1.TierTemplateRevision) string { | ||
| return fmt.Sprintf("number of ttrs %d is not less or equal than %d \n", len(actual), count) | ||
| }, | ||
| } | ||
| } |
There was a problem hiding this comment.
btw, these could be generic functions available as part of the new wait.For API
but that's for later, not for this PR 😉
There was a problem hiding this comment.
yeah, not huge expert and fan of generic code, but I agree it might make sense.
Actually there's also a lot of margin for improvement in the assertions of the TTRs as well. We can do those later if that makes sense.
There was a problem hiding this comment.
As mentioned during the sync call, I found a way we can use the standard assertion functions
#1073 (comment)
Co-authored-by: Matous Jobanek <mjobanek@redhat.com>
|
@MatousJobanek sorry, I've pushed few other fixes after you approved. Could you PTAL at 719c2a1 I've realized later that there were some problems with the test. Sorry for that! |
|
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: MatousJobanek, mfrancisc 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 |



e2e tests for codeready-toolchain/host-operator#1130
Verifying that once we update the
TierTemplate.Spce.TemplateObjectsfield or theNSTemplateTier.Spec.Parametersa new ttr's are created.Jira: https://issues.redhat.com/browse/KUBESAW-257