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

[mdatagen] Remove use of ReportFatalError in generated tests #9439

Merged
merged 1 commit into from Feb 3, 2024

Conversation

atoulme
Copy link
Contributor

@atoulme atoulme commented Jan 31, 2024

Description:
Remove use of ReportFatalError in generated tests

Link to tracking Issue:
open-telemetry/opentelemetry-collector-contrib#30579

Copy link

codecov bot commented Jan 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (421c655) 90.45% compared to head (31ea28a) 90.45%.

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.
📢 Have feedback on the report? Share it here.

@@ -33,27 +32,6 @@ import (
{{ end }}
)

// assertNoErrorHost implements a component.Host that asserts that there were no errors.
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

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.

@@ -33,27 +32,6 @@ import (
{{ end }}
)

// assertNoErrorHost implements a component.Host that asserts that there were no errors.
Copy link
Member

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.

@bogdandrutu bogdandrutu merged commit 5c176a9 into open-telemetry:main Feb 3, 2024
46 checks passed
@github-actions github-actions bot added this to the next release milestone Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants