-
-
Notifications
You must be signed in to change notification settings - Fork 94
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
context can be 1 or bigger #636
Conversation
added >= to if len(kc.config.Contexts) >= 1, as it could be a user has just 1 context in current file
Codecov Report
@@ Coverage Diff @@
## master #636 +/- ##
=======================================
Coverage 13.48% 13.48%
=======================================
Files 19 19
Lines 1891 1891
=======================================
Hits 255 255
Misses 1615 1615
Partials 21 21
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
@AdamRussak The You can see the exact effect in the output of the e2e test. |
The fix addresses a scenario of a single context in the file. I will go over the test and try to show it. P.s |
To cope with the problem of duplicate context names, the context is renamed each time it is added. This is indeed a problem and is discussed in #602, but I haven't had time to address it so far. |
i overcame it in my implementation. |
I will help you |
@sunny0826 please take a look (only) at the latest test run. some explanation: if len(kc.config.Contexts) > 1 {
newName = fmt.Sprintf("%s-%s", kc.fileName, HashSufString(name))
} else {
newName = name
} I replaced the this should also resolve issue #602 |
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 seems that this PR does not trigger the e2e test
Oh, it worked |
@sunny0826 i see you requested some changes, but I cant see what changes you requested. |
Sorry, I'm just waiting for the e2e test to finish running. |
LGTM |
added >= to if len(kc.config.Contexts) >= 1, as it could be a user has just 1 context in current file