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: add unit test cases for image_proxy_util.go #1786

Merged
merged 2 commits into from
Jul 24, 2018
Merged

test: add unit test cases for image_proxy_util.go #1786

merged 2 commits into from
Jul 24, 2018

Conversation

zhuorantan
Copy link
Contributor

@zhuorantan zhuorantan commented Jul 23, 2018

Ⅰ. Describe what this PR did

Add unit test cases for func canonicalAddr() and func useProxy()

Ⅱ. Does this pull request fix one issue?

Yes, #1760

Ⅲ. Describe how you did it

Implement test cases for all possible scenarios of func canonicalAddr() and func useProxy()

Ⅳ. Describe how to verify it

Run go test ctrd/image_proxy_util_test.go

Ⅴ. Special notes for reviews

Team 10

@codecov-io
Copy link

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1786      +/-   ##
==========================================
+ Coverage    56.3%   56.67%   +0.36%     
==========================================
  Files         200      200              
  Lines       15657    15657              
==========================================
+ Hits         8816     8873      +57     
+ Misses       5745     5692      -53     
+ Partials     1096     1092       -4
Flag Coverage Δ
#critest 33.62% <ø> (+0.14%) ⬆️
#integrationtest 37.65% <ø> (ø) ⬆️
#unittest 20.61% <ø> (+0.28%) ⬆️
Impacted Files Coverage Δ
daemon/mgr/container.go 53.3% <0%> (+0.15%) ⬆️
cri/v1alpha2/cri.go 66.13% <0%> (+0.17%) ⬆️
daemon/containerio/container_io.go 75.69% <0%> (+1.1%) ⬆️
ctrd/container.go 50.17% <0%> (+1.37%) ⬆️
ctrd/watch.go 78.12% <0%> (+3.12%) ⬆️
ctrd/image.go 81.18% <0%> (+4.45%) ⬆️
ctrd/image_proxy_util.go 67.18% <0%> (+57.81%) ⬆️

@zhuorantan zhuorantan mentioned this pull request Jul 24, 2018
}

// simulate the fetch of environmental variable no_proxy
noProxyEnv.once.Do(func() {})
Copy link
Contributor

Choose a reason for hiding this comment

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

little tricky, but LGTM

@fuweid fuweid merged commit 55c1a57 into AliyunContainerService:master Jul 24, 2018
@zhuorantan zhuorantan deleted the develop branch August 4, 2018 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants