Skip to content
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

Add tests for eventing/v1alpha1/register.go #595

Merged
merged 2 commits into from
Nov 8, 2018

Conversation

vaikas
Copy link
Contributor

@vaikas vaikas commented Nov 8, 2018

Addresses #591

Proposed Changes

  • Add unit tests for pkg/eventing/v1alpha1/register.go

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Nov 8, 2018
@knative-prow-robot knative-prow-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 8, 2018
@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 8, 2018
@grantr
Copy link
Contributor

grantr commented Nov 8, 2018

/woof

Copy link
Contributor

@grantr grantr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/hold

Holding for minor comment about scheme, cancel to ignore. :)


// TestKnownTypes makes sure that expected types get added.
func TestKnownTypes(t *testing.T) {
addKnownTypes(scheme.Scheme)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should use a non-global scheme to avoid impacting other tests:

scheme := runtime.NewScheme()
addKnownTypes(scheme)
types := scheme.KnownTypes(SchemeGroupVersion)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI controller-runtime fake client can only use scheme.Scheme until kubernetes-sigs/controller-runtime#137 is fixed.

@knative-prow-robot knative-prow-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm Indicates that a PR is ready to be merged. labels Nov 8, 2018
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: grantr, vaikas-google

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:
  • OWNERS [grantr,vaikas-google]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow-robot knative-prow-robot removed the lgtm Indicates that a PR is ready to be merged. label Nov 8, 2018
@vaikas
Copy link
Contributor Author

vaikas commented Nov 8, 2018

Thanks, changed. PTAL.

Copy link
Contributor

@grantr grantr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/hold cancel

@knative-prow-robot knative-prow-robot added lgtm Indicates that a PR is ready to be merged. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Nov 8, 2018
@knative-metrics-robot
Copy link

The following is the coverage report on pkg/.
Say /test pull-knative-eventing-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/eventing/v1alpha1/register.go 0.0% 100.0% 100.0

@knative-prow-robot knative-prow-robot merged commit 2b99e13 into knative:master Nov 8, 2018
Cali0707 added a commit to Cali0707/eventing that referenced this pull request May 3, 2024
…ive#7870) (knative#595)

fix: imc dispatcher doesn't have duplicate reporting

Signed-off-by: Calum Murray <cmurray@redhat.com>
Co-authored-by: Calum Murray <cmurray@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants