-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add coverage for Route controller failure paths. #1508
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mattmoor The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
b67f92a
to
584db70
Compare
pkg/controller/testing/reactions.go
Outdated
clientgotesting "k8s.io/client-go/testing" | ||
) | ||
|
||
func InduceFailure(verb, resource string) clientgotesting.ReactionFunc { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add some comments of how to use this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RFAL
49e22ac
to
207a31d
Compare
This introduces new functionality to our `TableTest` to enable a `Row` to provide `clientgotesting.ReactionFunc`s to induce failures during API requests through the fake clients. For example: ```go // Induce a failure creating revisions. WantErr: true, WithReactors: []clientgotesting.ReactionFunc{ InduceFailure("create", "revisions"), }, ``` Fixes: knative/serving#1501
207a31d
to
0d02089
Compare
/lgtm |
The following is the coverage report on pkg/. Say
*TestCoverage feature is being tested, do not rely on any info here yet |
route.go 98.8% ! |
/test pull-knative-serving-unit-tests |
1 similar comment
/test pull-knative-serving-unit-tests |
This introduces new functionality to our
TableTest
to enable aRow
to provideclientgotesting.ReactionFunc
s to induce failures during API requests through the fake clients. For example:Fixes: #1501