-
Notifications
You must be signed in to change notification settings - Fork 113
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
Refactor config environment variable override code #427
Refactor config environment variable override code #427
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. You may want to use Equal
instead of BeEquivalentTo
as the type conversion done by the latter one should not be needed in you Expect
s.
So far, there was no need to test cases that check whether the config setup including the environment variable overrides work as expected. New changes to the config setup would benefit from some level of unit tests. Introduce basic Ginkgo test suite. Add test cases for the currently possible environment overrides.
Over time, there was some code duplication accumulated for overriding configuration settings using an environment variable. Introduce one common function to do the float slice override. Combine `os.Getenv` and `if` case into one line, where possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: SaschaSchwarze0 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/assign @sbose78 |
Over time, there was some code duplication accumulated for overriding
configuration settings using an environment variable.
Introduce one common function to do the float slice override.
Combine
os.Getenv
andif
case into one line, where possible.Introduce basic Ginkgo test suite.
Add test cases for the currently possible environment overrides.