Problem
In knative-eventing, we have three files which define listers:
https://github.com/knative/eventing/blob/master/pkg/reconciler/testing/v1/listers.go
https://github.com/knative/eventing/blob/master/pkg/reconciler/testing/v1beta1/listers.go and
https://github.com/knative/eventing/blob/master/pkg/reconciler/testing/listers.go.
Some listers are duplicate among those three files. Some resources uses listers under pkg/testing/v1beta1, some resources use listers under /testing, some resources uses listers under pkg/testing/v1.
I guess
pkg/testing/v1 is for v1 resources and
pkg/testing/v1beta1 is for v1beta1 resources and
pkg/testing was at first for v1alpha1 resources.
But now the code style is not consistent.
In addition, for example, broker test helper methods follows such package naming example(https://github.com/knative/eventing/blob/master/pkg/reconciler/testing/v1/broker.go and https://github.com/knative/eventing/tree/master/pkg/reconciler/testing/v1beta1) but source test helper methods don't(https://github.com/knative/eventing/blob/master/pkg/reconciler/testing/sinkbinding.go)
It will be better if we can clean up duplicate listers for testing, and have a good structure of testing package, make it consistent among the codebases
Persona:
Which persona is this feature for?
Exit Criteria
Clean up duplicate listers for testing
Time Estimate (optional):
How many developer-days do you think this may take to resolve?
Additional context (optional)
Add any other context about the feature request here.
Problem
In knative-eventing, we have three files which define listers:
https://github.com/knative/eventing/blob/master/pkg/reconciler/testing/v1/listers.go
https://github.com/knative/eventing/blob/master/pkg/reconciler/testing/v1beta1/listers.go and
https://github.com/knative/eventing/blob/master/pkg/reconciler/testing/listers.go.
Some listers are duplicate among those three files. Some resources uses listers under pkg/testing/v1beta1, some resources use listers under /testing, some resources uses listers under pkg/testing/v1.
I guess
pkg/testing/v1 is for v1 resources and
pkg/testing/v1beta1 is for v1beta1 resources and
pkg/testing was at first for v1alpha1 resources.
But now the code style is not consistent.
In addition, for example, broker test helper methods follows such package naming example(https://github.com/knative/eventing/blob/master/pkg/reconciler/testing/v1/broker.go and https://github.com/knative/eventing/tree/master/pkg/reconciler/testing/v1beta1) but source test helper methods don't(https://github.com/knative/eventing/blob/master/pkg/reconciler/testing/sinkbinding.go)
It will be better if we can clean up duplicate listers for testing, and have a good structure of testing package, make it consistent among the codebases
Persona:
Which persona is this feature for?
Exit Criteria
Clean up duplicate listers for testing
Time Estimate (optional):
How many developer-days do you think this may take to resolve?
Additional context (optional)
Add any other context about the feature request here.