-
Notifications
You must be signed in to change notification settings - Fork 600
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
[WIP] Add reconciler test for EventType references #7114
Conversation
Skipping CI for Draft Pull Request. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Leo6Leo The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7114 +/- ##
==========================================
+ Coverage 77.73% 77.93% +0.20%
==========================================
Files 246 248 +2
Lines 13284 13315 +31
==========================================
+ Hits 10326 10377 +51
+ Misses 2435 2405 -30
- Partials 523 533 +10 ☔ View full report in Codecov by Sentry. |
…stion: how to retrieve all the eventType in the event registry by using go code
test/rekt/eventtype_test.go
Outdated
"testing" | ||
"time" | ||
|
||
"eventing/test/rekt/features/eventtype" |
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.
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.
Seems you're using an incorrect import path. The knative modules are all under knative.dev/<repo>/...
(no matter if it is a knative-sandbox project or not). So in this case it would be "knative.dev/eventing/test/rekt/features/eventtype"
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.
Regarding the approach: In the test files (under test/rekt//_test.go), we usually setup only the environment and call the feature test (as you have done). In the feature test (test/rekt/features/
) we have the according test implementation.
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.
I tried that before. If I use knative.dev/eventing/test/rekt/features/eventtype
, it will throw this error
test/rekt/eventtype_test.go:47:32: undefined: eventtype.eventTypeWithBrokerAsReference
Does importing the packages that starting with knative.dev/***
will actually download the latest knative package from the source? Because this eventTypeWithBrokerAsReference
is a new function that I added in this PR, it hasn't been merged into the main branch. @creydr
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.
It's probably, because you have to make eventTypeWithBrokerAsReference
public
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This Pull Request is stale because it has been open for 90 days with |
/remove-lifecycle stale |
Close as this PR wrong |
Fixes #7031
Proposed Changes
Add reconciler test for EventType references
Pre-review Checklist
Release Note
Docs