-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Kaniko secret #2321
Kaniko secret #2321
Conversation
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.
Actually, this is not how we should implement the optionality.
The logic should be implemented in secret.go
, here -- when both PullSecretName and PullSecret are empty then that should be fine.
This is how it should be right?
|
Codecov Report
@@ Coverage Diff @@
## master #2321 +/- ##
==========================================
- Coverage 61.86% 61.84% -0.02%
==========================================
Files 186 186
Lines 8050 8052 +2
==========================================
Hits 4980 4980
- Misses 2679 2681 +2
Partials 391 391
Continue to review full report at Codecov.
|
@prary could you add a unit test for the new code? |
Sure I will add |
@prary, Here is an example of creating a mock client and adding secrets
|
In your case, you need to mock the function call to An example is here: And In tests, you mock by : |
Co-Authored-By: Tejal Desai <tejal29@gmail.com>
Unfortunately you ended up changing a file which does not have any test coverage. :( In this case, the best way to test would be
See an example: skaffold/pkg/skaffold/test/test_test.go Line 50 in 10e3a55
you can add tests for
For test case 2, you will have to use instructions mentioned here #2321 (comment) |
kaniko pull secret should be optional
Resolving issue #2190