-
Notifications
You must be signed in to change notification settings - Fork 99
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 --context support in convert subcommand #260
Conversation
Codecov Report
@@ Coverage Diff @@
## master #260 +/- ##
==========================================
+ Coverage 49.72% 50.04% +0.31%
==========================================
Files 15 15
Lines 1096 1103 +7
==========================================
+ Hits 545 552 +7
Misses 520 520
Partials 31 31
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
@@ -1042,6 +1044,26 @@ func TestConvert(t *testing.T) { | |||
}, | |||
command: execName, | |||
}, | |||
{ | |||
name: "convert with context specified, auth info not specified by the context should not be changed", |
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.
maybe we should also add a test case for context specified, auth info not found case to ensure the behavior
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 think what you are suggesting is the essence of this test case? for any unmatched auth info, they should remain as is
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. My remaining question is on what should we show to the user if there is no matched context. This is a common case if there is typo in the --context
value. Silently omitting this might cause confusion in some cases. But I am fine to improve this part in later change.
it allows to convert only the selected context rather than the whole kubeconfig
fixes #87