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
override reporter config only when agent host or port was set in env #513
override reporter config only when agent host or port was set in env #513
Conversation
Signed-off-by: ilylia <ilylia@126.com>
Codecov Report
@@ Coverage Diff @@
## master #513 +/- ##
==========================================
+ Coverage 88.74% 88.75% +0.01%
==========================================
Files 60 60
Lines 3786 3790 +4
==========================================
+ Hits 3360 3364 +4
Misses 309 309
Partials 117 117
Continue to review full report at Codecov.
|
config/config_test.go
Outdated
@@ -252,6 +252,55 @@ func TestReporter(t *testing.T) { | |||
assert.Equal(t, "user", cfg.User) | |||
assert.Equal(t, "password", cfg.Password) | |||
|
|||
// |
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.
Could you please split these into separate, appropriately named tests? There's no reason to keep everything in one function, and it makes it hard to read.
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.
done
Signed-off-by: ilylia <ilylia@126.com>
eff4cec
to
f10fbc2
Compare
thanks! |
@yurishkuro any plans to tag a new version including this fix? |
Would you like to create a "Preparing Release" PR as described in RELEASE.md ? |
Which problem is this PR solving?
Short description of the changes
ReporterConfig.reporterConfigFromEnv()
, override reporter agent config only when agent host or port was set in env.