Suite for running upgrade tests in Knative components#1652
Conversation
|
Skipping CI for Draft Pull Request. |
mattmoor
left a comment
There was a problem hiding this comment.
Produced via:
gofmt -s -w $(find -path './vendor' -prune -o -path './third_party' -prune -o -name '*.pb.go' -prune -o -type f -name '*.go' -print)
goimports -w $(find -name '*.go' | grep -v vendor | grep -v third_party | grep -v .pb.go | grep -v wire_gen.go)
175462c to
f11a5e9
Compare
mattmoor
left a comment
There was a problem hiding this comment.
Produced via:
gofmt -s -w $(find -path './vendor' -prune -o -path './third_party' -prune -o -name '*.pb.go' -prune -o -type f -name '*.go' -print)
goimports -w $(find -name '*.go' | grep -v vendor | grep -v third_party | grep -v .pb.go | grep -v wire_gen.go)
mgencur
left a comment
There was a problem hiding this comment.
Hey @cardil , I think this looks great! Like it very much. I've put some comments here and there. There's probably some room for improvement to make it slightly cleaner or easier for the implementor of the background operations. Thanks!
5c13294 to
3e6301e
Compare
A StopSignal has been splitted to 2 separate type private stoppable and a StopEvent. StopEvent contains only elements that are essential for implementors to use *testing.T and signalize end of stop & verify procedure to upgrade suite.
Functions NewBackgroundVerification and WaitForStopEvent has been introduced to ease implementers to write a simple setup & verify background tests.
|
The following is the coverage report on the affected files.
|
|
@cardil thanks for all the changes! I think it looks good now. Looking forward to using that. |
|
/lgtm |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cardil, chizhg 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 |
Fixes #1638
This introduces a pluggable test suite for running upgrade tests in Knative components. Test suite is fully configurable, so that can be used for upgrade testing in Knative Serving, and Eventing, and Operator. Different configuration can be used by vendors that needs this to be slightly different.
This change will dramatically reduce the needed Bash code there is and let us run Serving and Eventing upgrade tests in the same time.
The idea in this PR is to define reusable plugins in Knative components (Serving, Eventing), use them in test code, and reuse them in integration (Operator) and vendor projects (like OpenShift Serverless). Creation of plugins can be done by implementing
OperationorBackgroundOperationinterfaces, or by using convenience methods ofNewOperation,NewBackgroundOperation(withWaitForStopEvent), orNewBackgroundVerification.Below are examples of such plugin wrote for Serving continual tests (that will be running in background) and a complete upgrade test:
and example test that uses it: