Skip to content

Use test wrapper in more tests #2222

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

Merged
merged 1 commit into from
Jun 6, 2019

Conversation

dgageot
Copy link
Contributor

@dgageot dgageot commented Jun 5, 2019

Signed-off-by: David Gageot [email protected]

@dgageot dgageot force-pushed the more-test-helper branch from c773cfa to 821605b Compare June 6, 2019 13:51
@codecov-io
Copy link

Codecov Report

Merging #2222 into master will increase coverage by 0.05%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2222      +/-   ##
==========================================
+ Coverage    58.1%   58.15%   +0.05%     
==========================================
  Files         188      188              
  Lines        7869     7869              
==========================================
+ Hits         4572     4576       +4     
+ Misses       2924     2922       -2     
+ Partials      373      371       -2
Impacted Files Coverage Δ
pkg/skaffold/runner/runner.go 70.73% <0%> (+1.62%) ⬆️
cmd/skaffold/app/cmd/runner.go 52.63% <0%> (+5.26%) ⬆️

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 d5d676b...821605b. Read the comment docs.


if test.shouldErrSet {
if test.shouldErr {
// if we expect an error when setting, don't try and unset
return
}

// unset the value
err = unsetConfigValue(test.key)
newConfig, cfgErr := readConfig()
Copy link
Contributor

Choose a reason for hiding this comment

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

not an issue with this PR. But we shd de-couple testing set and unset behavior in the same test into 2 separate tests.

"reflect"
)

func (t *T) CheckErrorAndTypeEquality(shouldErr bool, err error, expected, actual interface{}) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Very nice! There were times when i felt i shd check error type!
Thank you for adding this.

@tejal29 tejal29 merged commit 599e238 into GoogleContainerTools:master Jun 6, 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.

4 participants