Move the Configuration controller testing to use the new table-testing method.#1333
Conversation
In anticipation of rewriting the bulk of the Configuration controllers tests, move the current helper methods to the file that will keep using them.
…g method. This uses the same strategy as the Service controller, which is based on the OpenShift Ingress controller's tests. Backport a few fixes to the way we set up ObjectMeta and OwnerReferences in our Service tests uncovered bringing this up. This also changes the way we create Build names to more easily test it (mirrors what we do for Revision today). The most notable difference from the Service controller testing is that this needs to watch for Actions across 2 clients, so I refactored the loop body a bit to support that. This should make it easier to copy to Route and Revision. Fixes: knative/serving#1220
There was a problem hiding this comment.
Is this "child object metadata"? I'm a fan of the brief names but a function-level comment here would help :)
There was a problem hiding this comment.
From the PR description / commit message:
This also changes the way we create Build names to more easily test it (mirrors what we do for Revision today).
There was a problem hiding this comment.
tiniest nit: "builds"
There was a problem hiding this comment.
tiniest nit: "builds"
|
The following is the coverage report on pkg/. Say
*TestCoverage feature is being tested, do not rely on any info here yet |
|
/test pull-knative-serving-unit-tests |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jonjohnsonjr, mattmoor 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 |
This uses the same strategy as the Service controller, which is based on the OpenShift Ingress controller's tests. Backport a few fixes to the way we set up ObjectMeta and OwnerReferences in our Service tests uncovered bringing this up. Move the old test methods over to the
queueing_test.go, which still uses some of them. This also changes the way we create Build names to more easily test it (mirrors what we do for Revision today).The most notable difference from the Service controller testing is that this needs to watch for Actions across 2 clients, so I refactored the loop body a bit to support that. This should make it easier to copy to Route and Revision.
Fixes: #1220