Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

mbohlool
Copy link
Contributor

Fixes #182

Also patch this to Release 1.0.

@mbohlool mbohlool added this to the V2.0 milestone Apr 19, 2017
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 19, 2017
@codecov-io
Copy link

codecov-io commented Apr 19, 2017

Codecov Report

Merging #183 into master will increase coverage by 0.1%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #183     +/-   ##
=========================================
+ Coverage   94.46%   94.56%   +0.1%     
=========================================
  Files           9        9             
  Lines         668      681     +13     
=========================================
+ Hits          631      644     +13     
  Misses         37       37
Impacted Files Coverage Δ
kubernetes/config/kube_config_test.py 92.22% <100%> (+0.23%) ⬆️
kubernetes/config/kube_config.py 96.47% <100%> (+0.1%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f399ece...a0577b0. Read the comment docs.

@rafaelcaricio
Copy link

@mbohlool Thank you!

@mbohlool mbohlool requested review from mml and detiber and removed request for mml April 20, 2017 18:21
content of obj[%file_key_name] and represent it as file or data.
Note that the data is preferred. The obj[%file_key_name] will be used iff
obj['%data_key_name'] is not set or empty. Assumption is file content is
raw data and data field is base64 string."""

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: I may be wrong but shouldn't we update comment to reflect that raw data can be base64 encoded now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a comment explaining the flag. Thanks.

t = FileOrData(obj=obj, file_key_name=TEST_FILE_KEY,
base64_file_content=False)
self.assertEqual(TEST_DATA, t.as_data())

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, I am not able to find test case for base64_file_content=True. I might have missed something here as I am new to the codebase. One more thing, what's the difference between this test-case and the one above, I think, since base64_file_content=False by default, the -ve scenario may be same as the old one. Please correct me, if I am wrong.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

base64_file_content default value is True. So the test case above is testing True case and this one is testing the False case.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies, I wrote my other comment in haste. In fact, I was thinking the default value is False.


def __init__(self, obj, file_key_name, data_key_name=None,
file_base_path=""):
file_base_path="", base64_file_content=True):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ravisantoshgudimetla this is where I set the default value to True.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I misread this part. Thanks for correcting.

Copy link

@ravisantoshgudimetla ravisantoshgudimetla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except for the NIT, code looks good.

@mbohlool mbohlool merged commit 94a276b into kubernetes-client:master Apr 24, 2017
mbohlool added a commit that referenced this pull request Apr 24, 2017
…pstream-release-1.0

Automated cherry pick of #183
mbohlool added a commit that referenced this pull request Apr 24, 2017
mbohlool added a commit that referenced this pull request Apr 24, 2017
…d-cherry-pick-of-#183-upstream-release-1.0

Revert "Automated cherry pick of #183"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants