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

chore: add test to catch invalid struct tags #3035

Merged
merged 4 commits into from
May 1, 2024
Merged

Conversation

markphelps
Copy link
Collaborator

@markphelps markphelps commented Apr 30, 2024

Re: #3034

ℹ️ this shows how the test would have caught #3034 , we should rebase this test on that branch or main once it gets merged in for this test to pass

Adds a test to hopefully catch any incorrect struct tag values:

  /Users/markphelps/workspace/flipt/internal/config/config_test.go:1515: 
       Error Trace:	/Users/markphelps/workspace/flipt/internal/config/config_test.go:1515
        	            		/Users/markphelps/workspace/flipt/internal/config/config_test.go:1526
        	            		/Users/markphelps/workspace/flipt/internal/config/config_test.go:1498
       Error:      	Should be true
       Test:       	TestStructTags
       Messages:   	mapstructure tag for field 'TracingConfig.SamplingRatio' should be snake_case but is 'samplingRatio'

@markphelps markphelps requested a review from a team as a code owner April 30, 2024 20:18
Copy link
Member

@GeorgeMac GeorgeMac left a comment

Choose a reason for hiding this comment

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

Sweet

@markphelps markphelps merged commit 2868dd3 into main May 1, 2024
28 of 29 checks passed
@markphelps markphelps deleted the config-tags-test branch May 1, 2024 13:28
markphelps added a commit that referenced this pull request May 1, 2024
* cloud:
  chore: revert rm config
  chore: add test to catch invalid struct tags (#3035)
  feat(cmd/flipt): wire in flipt client listener
  fix(breaking): sampling ratio yaml config (#3034)
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