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
[mdatagen] Remove use of ReportFatalError in generated tests #9439
Conversation
451c710
to
8ee06bd
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #9439 +/- ##
=======================================
Coverage 90.45% 90.45%
=======================================
Files 344 344
Lines 18024 18024
=======================================
Hits 16303 16303
Misses 1392 1392
Partials 329 329 ☔ View full report in Codecov by Sentry. |
@@ -33,27 +32,6 @@ import ( | |||
{{ end }} | |||
) | |||
|
|||
// assertNoErrorHost implements a component.Host that asserts that there were no errors. |
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.
Should we instead generate an assert no error StatusReporter?
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'd do it in phases. I am fairly certain that if we generate an assert no error StatusReporter, tests will fail because it's ok for them to report status errors on start if say we have no database to connect to.
I would also create this reporter in a common lib rather than in every generated test.
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 think we can assert if the status is fatal not on error.
8ee06bd
to
bf672e4
Compare
bf672e4
to
31ea28a
Compare
@@ -33,27 +32,6 @@ import ( | |||
{{ end }} | |||
) | |||
|
|||
// assertNoErrorHost implements a component.Host that asserts that there were no errors. |
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 think we can assert if the status is fatal not on error.
Description:
Remove use of ReportFatalError in generated tests
Link to tracking Issue:
open-telemetry/opentelemetry-collector-contrib#30579