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

test: use rstest for table testing sdk resource #2407

Merged
merged 3 commits into from
Dec 10, 2024

Conversation

pitoniak32
Copy link
Contributor

fixes: #2384

Changes

Described more in the aboved linked issue. But the goal here is using rstest to improve the test writing experience and allow for tests to have multiple cases in a more readable format.

Merge requirement checklist

  • CONTRIBUTING guidelines followed
  • Unit tests added/updated (if applicable)
  • Appropriate CHANGELOG.md files updated for non-trivial, user-facing changes
  • Changes in public API reviewed (if applicable)

@pitoniak32 pitoniak32 requested a review from a team as a code owner December 10, 2024 13:26
Copy link

codecov bot commented Dec 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.3%. Comparing base (540cdb3) to head (a31828e).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #2407     +/-   ##
=======================================
- Coverage   79.3%   79.3%   -0.1%     
=======================================
  Files        123     123             
  Lines      21566   21535     -31     
=======================================
- Hits       17112   17082     -30     
+ Misses      4454    4453      -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@cijothomas cijothomas left a comment

Choose a reason for hiding this comment

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

LGTM!

@cijothomas
Copy link
Member

@open-telemetry/rust-approvers Please share your thoughts. We try to avoid any external dependency in the shipped code, but for tests/infra, this is acceptable.

Copy link
Contributor

@TommyCpp TommyCpp left a comment

Choose a reason for hiding this comment

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

I always favor table driven test methods so 👍 on this change

Copy link
Member

@lalitb lalitb left a comment

Choose a reason for hiding this comment

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

much cleaner. I anticipate it would be more helpful for metrics tests.

@cijothomas cijothomas merged commit f513768 into open-telemetry:main Dec 10, 2024
23 checks passed
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.

[Testing]: Improve the test setup experience with rstest
4 participants