Improve eventing v1beta1 conversion tests#3395
Conversation
| switch sink := to.(type) { | ||
| case *v1.Broker: | ||
| sink.Spec.Config = source.Spec.Config | ||
| if err := source.Spec.Delivery.ConvertTo(ctx, sink.Spec.Delivery); err != nil { |
There was a problem hiding this comment.
was getting a segfault here, discovered that with a new test case
|
The following is the coverage report on the affected files.
|
|
/assign |
|
/lgtm |
|
Oh, I now realize in other conversion tests (nothing on the current state of the source tree, but saw some stuff from Git history) there was a test like v1->v1beta1->v1. I will do that in a separate PR. let's merge this one anyway if that's ok |
|
|
||
| // ConvertFrom implements apis.Convertible | ||
| func (sink *Trigger) ConvertFrom(ctx context.Context, from apis.Convertible) error { | ||
| func (sink *Trigger) ConvertFrom(_ context.Context, from apis.Convertible) error { |
There was a problem hiding this comment.
IDE was complaining unused var and I listen to my IDE
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aliok, vaikas 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 |
Proposed Changes
I can improve conversion tests for other types after seeing how this PR goes.
UPDATE: I now realize in other conversion tests there was a test like v1->v1beta1->v1. (nothing on the current state of the source tree, but saw some stuff from Git history)
I will do that in a separate PR. let's merge this one anyway