-
Notifications
You must be signed in to change notification settings - Fork 344
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 CQLSH_PORT environment variable #1243
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1243 +/- ##
==========================================
+ Coverage 87.34% 87.36% +0.01%
==========================================
Files 90 90
Lines 4900 4907 +7
==========================================
+ Hits 4280 4287 +7
Misses 457 457
Partials 163 163
Continue to review full report at Codecov.
|
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 to me! A small improvement could be done in the test, but if you disagree with the proposed change, I'll merge it as is.
foundValue := "" | ||
for _, e := range b[0].Spec.Template.Spec.Containers[0].Env { | ||
if e.Name == "CQLSH_PORT" { | ||
foundValue = e.Value |
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.
Small improvement: you could make an assertion here: assert.Equal(t, "9042", ...)
and then return. Where your current assert.Equal
is (at the end of the test), you could have a assert.Fail(t, "value for CQLSH_PORT not found")
d057532
to
f38619c
Compare
for _, e := range b[0].Spec.Template.Spec.Containers[0].Env { | ||
if e.Name == "CQLSH_PORT" { | ||
foundValue := e.Value | ||
assert.Equal(t, "9042", foundValue, "unexpected CQLSH_PORT environment var value") |
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.
It's missing the return statement, so that the test is now failing :-) You might also not need the foundValue
anymore: you can use e.Value
directly in the assertion.
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.
Once the return statement is added, the test should pass and it'll be ready to be merged.
Signed-off-by: Ashmita Bohara <[email protected]>
48a8240
to
389203b
Compare
LGTM. Will be merged on green. Thank you for your contribution! |
Thank you for your quick feedbacks @jpkrohling It was my pleasure contributing. |
Signed-off-by: Ashmita Bohara [email protected]
Since jaegertracing/jaeger#2472 is merged, adding support for custom port here.
Partially Fixes: #1179