-
Notifications
You must be signed in to change notification settings - Fork 592
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
Improve eventing v1beta1 conversion tests #3395
Improve eventing v1beta1 conversion tests #3395
Conversation
@@ -29,8 +29,10 @@ func (source *Broker) ConvertTo(ctx context.Context, to apis.Convertible) error | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
@@ -45,16 +45,16 @@ func (source *Trigger) ConvertTo(ctx context.Context, to apis.Convertible) error | |||
} | |||
|
|||
// 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why that ?
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.
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
Needs 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