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

Noop minor refactoring of a apierr/error_override_test.go #954

Closed
wants to merge 3 commits into from

Conversation

renaudhartert-db
Copy link
Contributor

@renaudhartert-db renaudhartert-db commented Jun 23, 2024

Changes

This PR does a minor noop refactoring of apierr/error_override_test.go to better match the style of idiomatic table-tests. In particular, it:

  • Inlines the applyOverridesTestCase struct which is replaced with an anonymous struct. There's nothing wrong with that struct per se but seeing it made me think at first that it was doing more than simply defining the table cases.
  • Remove the unused name field (was always "") and remove the subtests rather than giving them an arbitrary name (e.g. the index of the test).

Alternatively, we could give meaningful names to the subtests and keep them. Though, what these names should be was not obvious to me.

Tests

The test coverage is the same as before this change.

  • make test passing
  • make fmt applied
  • relevant integration tests applied

@codecov-commenter
Copy link

codecov-commenter commented Jun 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (main@ce3dc98). Learn more about missing BASE report.

Additional details and impacted files
@@          Coverage Diff           @@
##             main    #954   +/-   ##
======================================
  Coverage        ?   7.03%           
======================================
  Files           ?     282           
  Lines           ?   65398           
  Branches        ?       0           
======================================
  Hits            ?    4602           
  Misses          ?   60487           
  Partials        ?     309           

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

@renaudhartert-db renaudhartert-db deleted the rh/format-noop branch October 31, 2024 10:10
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.

2 participants