-
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
Leverage "Reactors" to better cover failure paths. #1501
Labels
area/API
API objects and controllers
area/test-and-release
It flags unit/e2e/conformance/perf test issues for product features
Comments
google-prow-robot
added
area/API
API objects and controllers
area/test-and-release
It flags unit/e2e/conformance/perf test issues for product features
labels
Jul 5, 2018
cc @tcnghia |
Neato |
I'm thinking that we should augment For example: WithReactors: []ReactorFunc{
InduceFailure("create", "revisions"),
}, I may try to play with this today. /assign @mattmoor |
This was referenced Jul 6, 2018
I like this idea, though I'm curious how it works when using listers instead of clients. |
@grantr It won't let use cover |
This was referenced Jul 6, 2018
google-prow-robot
pushed a commit
that referenced
this issue
Jul 6, 2018
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: #1501
google-prow-robot
pushed a commit
that referenced
this issue
Jul 6, 2018
This builds on #1501 to add coverage to the failure paths in the Service controller.
google-prow-robot
pushed a commit
that referenced
this issue
Jul 6, 2018
This builds on #1501 to add coverage to the failure paths in the Configuration controller.
google-prow-robot
pushed a commit
that referenced
this issue
Jul 6, 2018
This builds on #1501 to add coverage to the failure paths in the Revision controller.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/API
API objects and controllers
area/test-and-release
It flags unit/e2e/conformance/perf test issues for product features
Reactors let you register a ReactionFunc callback that intercepts requests make through the K8s fake clients. We should be able to use them to insert request failures along paths through Reconcile that wouldn't otherwise fail.
I'd like to come up with a neat little extension to
TableTest
that enables us to drive our coverage up even further, since failure paths are a significant blind spot in our current coverage.The text was updated successfully, but these errors were encountered: