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 a unit-test for apis/opts/ports.go & add a unit-test for method getSELinuxSecurityOpts in cri_utils.go & add a unit-test for method modifyContainerNamespaceOptions in cri_utils.go #1935

Closed
wants to merge 9 commits into from

Conversation

scuzhangp123
Copy link

@scuzhangp123 scuzhangp123 commented Jul 30, 2018

Ⅰ. Describe what this PR did
add a unit-test for ports.go
add a unit-test for method getSELinuxSecurityOpts in cri_utils.go
add a unit-test for method modifyContainerNamespaceOptions in cri_utils.go

Ⅱ. Does this pull request fix one issue?
fix issues #1906
fix issues #1912
fix issues #1911

Ⅲ. Describe how you did it
Build unit test by condition combination coverage(ccc).

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews
Come from Group 5

@pouchrobot
Copy link
Collaborator

We found this is your first time to contribute to Pouch, @scuzhangp123
👏 We really appreciate it.
Just remind that you have read the contribution guide: https://github.com/alibaba/pouch/blob/master/CONTRIBUTING.md
If you didn't, you should do that first. If done, welcome again and please enjoy hacking! 🍻

@codecov-io
Copy link

codecov-io commented Jul 30, 2018

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1935      +/-   ##
==========================================
+ Coverage    63.3%   63.44%   +0.14%     
==========================================
  Files         200      200              
  Lines       15521    15521              
==========================================
+ Hits         9825     9847      +22     
+ Misses       4456     4427      -29     
- Partials     1240     1247       +7
Flag Coverage Δ
#criv1alpha1test 33.78% <ø> (+0.02%) ⬆️
#criv1alpha2test 34.24% <ø> (-0.08%) ⬇️
#integrationtest 38.41% <ø> (+0.01%) ⬆️
#unittest 21.22% <ø> (+0.36%) ⬆️
Impacted Files Coverage Δ
cri/stream/portforward/httpstream.go 69.16% <0%> (-6.67%) ⬇️
cri/stream/runtime.go 71.01% <0%> (-2.9%) ⬇️
ctrd/container.go 51.54% <0%> (-0.69%) ⬇️
cri/v1alpha2/cri.go 66.31% <0%> (-0.18%) ⬇️
daemon/mgr/container.go 53.85% <0%> (-0.16%) ⬇️
daemon/mgr/system.go 76.92% <0%> (+1.7%) ⬆️
ctrd/image.go 78.71% <0%> (+1.98%) ⬆️
cri/v1alpha1/cri_utils.go 77.14% <0%> (+2.85%) ⬆️
ctrd/watch.go 75.75% <0%> (+3.03%) ⬆️
apis/opts/ports.go 56.52% <0%> (+56.52%) ⬆️

@pouchrobot pouchrobot added size/L and removed size/M labels Jul 30, 2018
@scuzhangp123 scuzhangp123 changed the title test: add a unit-test for apis/opts/ports.go test: add a unit-test for apis/opts/ports.go & add a unit-test for cri_utils.go Jul 30, 2018
@pouchrobot
Copy link
Collaborator

@scuzhangp123 Thanks for your contribution. 🍻
Please sign off in each of your commits.

@scuzhangp123 scuzhangp123 changed the title test: add a unit-test for apis/opts/ports.go & add a unit-test for cri_utils.go test: add a unit-test for apis/opts/ports.go & add a unit-test for cri_utils.go & modifyContainerNamespaceOptions Jul 30, 2018
@scuzhangp123 scuzhangp123 changed the title test: add a unit-test for apis/opts/ports.go & add a unit-test for cri_utils.go & modifyContainerNamespaceOptions test: add a unit-test for apis/opts/ports.go & add a unit-test for method getSELinuxSecurityOpts in cri_utils.go & add a unit-test for method modifyContainerNamespaceOptions in cri_utils.go Jul 31, 2018
@YaoZengzeng
Copy link
Contributor

Could you please squash your commits and make them more clear? :)

@pouchrobot
Copy link
Collaborator

ping @scuzhangp123
Conflict happens after merging a previous commit.
Please rebase the branch against master and push it back again. Thanks a lot.

@fuweid fuweid closed this Aug 1, 2018
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.

5 participants