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

Test helper to override value for tests #2147

Merged
merged 2 commits into from
May 20, 2019

Conversation

dgageot
Copy link
Contributor

@dgageot dgageot commented May 17, 2019

I added a helper function to testutil to override variables for tests and restore them at the end.
wdyt about it?

The only issue is that when the variable type changes, there's no compilation error. It's detected when the test runs. If think it's ok.

If you like it, I can modify the whole codebase.

@codecov-io
Copy link

codecov-io commented May 17, 2019

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2147   +/-   ##
=======================================
  Coverage   56.73%   56.73%           
=======================================
  Files         183      183           
  Lines        7902     7902           
=======================================
  Hits         4483     4483           
  Misses       3003     3003           
  Partials      416      416

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 fd8ac69...f704c64. Read the comment docs.

Copy link
Contributor

@nkubala nkubala left a comment

Choose a reason for hiding this comment

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

I think this wouldn't work if we ever switched to run these tests in parallel, but I guess what we have right now probably wouldn't work anyway.

+1

@tejal29 tejal29 force-pushed the override-helper branch from 2b958ad to f704c64 Compare May 20, 2019 23:23
@tejal29 tejal29 merged commit 0f2cb02 into GoogleContainerTools:master May 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants