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

[componenttest] Improve config struct checks #12590

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

evan-bradley
Copy link
Contributor

Description

Improves our config struct checks by allowing for a few more cases that are possible with mapstructure.

Copy link

codecov bot commented Mar 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.19%. Comparing base (7d3e03e) to head (d67b8bb).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12590      +/-   ##
==========================================
+ Coverage   92.18%   92.19%   +0.01%     
==========================================
  Files         469      469              
  Lines       25394    25395       +1     
==========================================
+ Hits        23409    23413       +4     
+ Misses       1574     1572       -2     
+ Partials      411      410       -1     

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

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment on lines +107 to +110
case "remain":
if f.Type.Kind() != reflect.Map && f.Type.Kind() != reflect.Interface {
return fmt.Errorf(`attempt to use "remain" on non-map or interface type field %q`, f.Name)
}
Copy link
Member

Choose a reason for hiding this comment

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

Do we have any uses of remain currently? Should we just forbid its usage entirely?

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