Skip to content

Test helper to override value for tests#2147

Merged
tejal29 merged 2 commits intoGoogleContainerTools:masterfrom
dgageot:override-helper
May 20, 2019
Merged

Test helper to override value for tests#2147
tejal29 merged 2 commits intoGoogleContainerTools:masterfrom
dgageot:override-helper

Conversation

@dgageot
Copy link
Copy Markdown
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.

Signed-off-by: David Gageot <david@gageot.net>
@codecov-io
Copy link
Copy Markdown

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
Copy Markdown
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