Skip to content
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

fix: use context manager for mtls env var #548

Merged
merged 1 commit into from
Jul 23, 2020
Merged

Conversation

busunkim96
Copy link
Contributor

git seems to be producing a hard to read diff, but the only change I've made is to use with mock.patch.dict(...) to modify the environment variable GOOGLE_API_USE_MTLS.

I deleted del os.environ["GOOGLE_API_USE_MTLS"] in #496 without realizing there were more tests above, and this group of tests started failing for me locally after the latest release.

@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Jul 23, 2020
@codecov
Copy link

codecov bot commented Jul 23, 2020

Codecov Report

Merging #548 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #548   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           26        26           
  Lines         1508      1477   -31     
  Branches       308       308           
=========================================
- Hits          1508      1477   -31     
Impacted Files Coverage Δ
gapic/schema/api.py 100.00% <0.00%> (ø)
gapic/schema/imp.py 100.00% <0.00%> (ø)
gapic/utils/cache.py 100.00% <0.00%> (ø)
gapic/schema/metadata.py 100.00% <0.00%> (ø)
gapic/schema/wrappers.py 100.00% <0.00%> (ø)
gapic/generator/options.py 100.00% <0.00%> (ø)
gapic/samplegen/samplegen.py 100.00% <0.00%> (ø)
gapic/samplegen_utils/types.py 100.00% <0.00%> (ø)

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 166c140...c45efa5. Read the comment docs.

@software-dov software-dov merged commit d19e180 into master Jul 23, 2020
@software-dov software-dov deleted the use-context branch July 23, 2020 00:29
@arithmetic1728
Copy link
Collaborator

@busunkim96 Sorry this is essentially caused by a problem of the showcase test. I just noticed client.DEFAULT_ENDPOINT and client_DEFAULT_MTLS_ENDPOINT happen to be the same (localhost) for showcase unit tests. This is the reason why for your PR #496 the showcase unit tests can pass, but any generated client unit test fail. Just sent a PR #551 to address this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants