-
Notifications
You must be signed in to change notification settings - Fork 287
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
Add test env and move env helper to be usable everywhere #166
Conversation
@glibsm, thanks for your PR! By analyzing the history of the files in this pull request, we identified @anuptalwalkar, @shawnburke and @sectioneight to be potential reviewers. |
// | ||
// Useful, for example, to enable alternate functionality of some components | ||
// during testing that might normally require network connectivity or a database | ||
func IsTestEnv() bool { |
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.
There could be different environments with different purposes, e.g. staging, internal, etc. Shouldn't test be controlled by the service config as well?
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.
Based on the earlier discussion, I'll make some changes to this diff and remove this functionality.
Going to keep environmental knowledge restricted to the config package. Everything else should come from configuration values, rather than the knowledge of which environment the application is running in.
@@ -51,7 +51,8 @@ var ( | |||
) | |||
|
|||
var ( | |||
_devEnv = "development" | |||
_devEnv = "development" | |||
_testEnv = "test" |
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.
unused?
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.
interesting. did go compiler sneeze while processing this line? I thought unused vars were an error
Unused globals aren't errors :(
…On Fri, Jan 13, 2017 at 2:06 PM Alex ***@***.***> wrote:
***@***.**** approved this pull request.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#166 (review)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAF7P8JNqjdgstTu6H77abANIso-oSADks5rR_VQgaJpZM4LiXFo>
.
|
No description provided.