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 mock test for system_version #1004

Merged
merged 1 commit into from
Mar 29, 2018
Merged

test: add mock test for system_version #1004

merged 1 commit into from
Mar 29, 2018

Conversation

ZouRui89
Copy link
Contributor

Signed-off-by: Zou Rui [email protected]

Ⅰ. Describe what this PR did

add mock test for system_version on client side

Ⅱ. Does this pull request fix one issue?

Ⅲ. Describe how you did it

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@codecov-io
Copy link

Codecov Report

Merging #1004 into master will increase coverage by 0.14%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1004      +/-   ##
==========================================
+ Coverage   13.67%   13.81%   +0.14%     
==========================================
  Files         124      125       +1     
  Lines        8395     8395              
==========================================
+ Hits         1148     1160      +12     
+ Misses       7148     7135      -13     
- Partials       99      100       +1
Impacted Files Coverage Δ
client/system.go 0% <ø> (ø) ⬆️
client/system_version.go 100% <100%> (ø)
client/request.go 48.78% <0%> (+2.43%) ⬆️
client/utils.go 75% <0%> (+25%) ⬆️

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 3ac559e...48b7ffd. Read the comment docs.

HTTPCli: httpClient,
}

if _, err := client.SystemVersion(context.Background()); err != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

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

you can assert the value returned by the function.

@allencloud
Copy link
Collaborator

LGTM

@pouchrobot pouchrobot added the LGTM one maintainer or community participant agrees to merge the pull reuqest. label Mar 29, 2018
@allencloud allencloud merged commit b06bc83 into AliyunContainerService:master Mar 29, 2018
@ZouRui89 ZouRui89 deleted the mock_version branch April 2, 2018 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
areas/test LGTM one maintainer or community participant agrees to merge the pull reuqest. size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants