-
Notifications
You must be signed in to change notification settings - Fork 895
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
Introduce kubectl argo rollout get
command
#230
Conversation
jessesuen
commented
Oct 28, 2019
•
edited
Loading
edited
Codecov Report
@@ Coverage Diff @@
## master #230 +/- ##
==========================================
- Coverage 85.28% 83.42% -1.87%
==========================================
Files 49 57 +8
Lines 4398 5079 +681
==========================================
+ Hits 3751 4237 +486
- Misses 460 620 +160
- Partials 187 222 +35
Continue to review full report at Codecov.
|
36b5f5a
to
c36b66f
Compare
4da1bb5
to
02917da
Compare
spec: | ||
containers: | ||
- args: | ||
- FLIP=$(($(($RANDOM%10))%2)) && exit $FLIP |
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.
TIL $RANDOM returns a random number!
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's a lot of untested code in the info package, but I think it is fine for now since the code is for a command-line tool. We can circle back to it for v0.7, and thankfully a large part of the untested sections looks reasonable to test by creating mocks.
|
||
func NewExperimentAnalysisRollout() *RolloutObjects { | ||
return discoverObjects(testDir + "/experiment-analysis") | ||
} |
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.
This is awesome and going to make testing significantly easier!
) | ||
|
||
func (o *GetOptions) Clear() { | ||
fmt.Fprint(o.Out, "\033[H\033[2J") |
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.
I'm assuming these commands clear the terminal based on the function name, but I am not 100% sure. Can you add a comment either explaining the values or put a link to somewhere that would
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's a lot of untested code in the info package, but I think it is fine for now since the code is for a command-line tool. We can circle back to it for v0.7, and thankfully a large part of the untested sections looks reasonable to test by creating mocks.
Yes. The pod and replicaset assessment code was lifted from Argo CD, so I didn't bother writing tests for them, also because the CLI test was indirectly testing them.
var ( | ||
colorMapping = map[string]int{ | ||
info.IconWaiting: FgYellow, | ||
info.IconProgressing: FgBlue, |
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.
I'm not a huge fan of blue since it can be challenging to read on Black, but since we are doing Blue/Green, I almost feel like we have to
02917da
to
4311461
Compare
4311461
to
e0197ed
Compare