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 for getAppArmorSecurityOpts and getSeccompSecurityOpts #1948

Merged
merged 1 commit into from
Aug 1, 2018

Conversation

kaizizhu
Copy link
Contributor

@kaizizhu kaizizhu commented Jul 31, 2018

…x #1913

Signed-off-by: kaicizhu kaici.zkc@alibaba-inc.com

Ⅰ. Describe what this PR did

add unit-test for getAppArmorSecurityOpts&getSeccompSecurityOpts

Ⅱ. Does this pull request fix one issue?

fix #1913

Ⅲ. Describe how you did it

Add four different test case for each function. One test case for default value, one for unconfined value, one for value with prefix, one for value without prefix.

Ⅳ. Describe how to verify it

go test

Ⅴ. Special notes for reviews

@CLAassistant
Copy link

CLAassistant commented Jul 31, 2018

CLA assistant check
All committers have signed the CLA.

@pouchrobot
Copy link
Collaborator

We found this is your first time to contribute to Pouch, @kaizizhu
👏 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! 🍻

@kaizizhu kaizizhu changed the title Group 4: add unit-test for getAppArmorSecurityOpts&getSeccompSecurityOpts , fix #1913 BJ266:-Group 4: add unit-test for getAppArmorSecurityOpts&getSeccompSecurityOpts , fix #1913 Jul 31, 2018
@kaizizhu kaizizhu changed the title BJ266:-Group 4: add unit-test for getAppArmorSecurityOpts&getSeccompSecurityOpts , fix #1913 BJ266-Group 4: add unit-test for getAppArmorSecurityOpts&getSeccompSecurityOpts , fix #1913 Jul 31, 2018
@codecov-io
Copy link

codecov-io commented Jul 31, 2018

Codecov Report

Merging #1948 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1948      +/-   ##
==========================================
- Coverage   63.31%   63.29%   -0.02%     
==========================================
  Files         200      200              
  Lines       15522    15522              
==========================================
- Hits         9828     9825       -3     
+ Misses       4455     4454       -1     
- Partials     1239     1243       +4
Flag Coverage Δ
#criv1alpha1test 33.78% <ø> (-0.08%) ⬇️
#criv1alpha2test 34.14% <ø> (-0.14%) ⬇️
#integrationtest 38.31% <ø> (-0.12%) ⬇️
#unittest 21.01% <ø> (+0.15%) ⬆️
Impacted Files Coverage Δ
ctrd/watch.go 69.69% <0%> (-6.07%) ⬇️
apis/server/utils.go 61.9% <0%> (-4.77%) ⬇️
cri/v1alpha1/cri.go 65.4% <0%> (-0.19%) ⬇️
daemon/mgr/container.go 53.85% <0%> (-0.16%) ⬇️
cri/v1alpha1/cri_utils.go 75.35% <0%> (+1.07%) ⬆️

@kaizizhu kaizizhu changed the title BJ266-Group 4: add unit-test for getAppArmorSecurityOpts&getSeccompSecurityOpts , fix #1913 BJ266-4: add unit-test for getAppArmorSecurityOpts&getSeccompSecurityOpts , fix #1913 Jul 31, 2018
@YaoZengzeng
Copy link
Contributor

LGTM

Thanks for your brilliant work :)

@YaoZengzeng YaoZengzeng merged commit ac50d27 into AliyunContainerService:master Aug 1, 2018
@allencloud allencloud changed the title BJ266-4: add unit-test for getAppArmorSecurityOpts&getSeccompSecurityOpts , fix #1913 test: add unit-test for getAppArmorSecurityOpts&getSeccompSecurityOpts , fix #1913 Aug 1, 2018
@allencloud allencloud changed the title test: add unit-test for getAppArmorSecurityOpts&getSeccompSecurityOpts , fix #1913 test: add unit-test for getAppArmorSecurityOpts&getSeccompSecurityOpts Aug 1, 2018
@allencloud allencloud changed the title test: add unit-test for getAppArmorSecurityOpts&getSeccompSecurityOpts test: add unit-test for getAppArmorSecurityOpts and getSeccompSecurityOpts 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.

[help wanted] add unit-test for getAppArmorSecurityOpts&getSeccompSecurityOpts
5 participants