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 daemon/config/getUnknownFlags #1808

Merged
merged 1 commit into from
Jul 24, 2018

Conversation

cyrann
Copy link
Contributor

@cyrann cyrann commented Jul 24, 2018

Ⅰ. Describe what this PR did

Add unit-test for daemon/config/getUnknownFlags

Ⅱ. Does this pull request fix one issue?

fixes #1758

Ⅲ. Describe how you did it

Implement test cases for all possible scenarios of func getUnknownFlags()

Ⅳ. Describe how to verify it

Run go test daemon/config/config_test.go

Ⅴ. Special notes for reviews

group 264-10

@CLAassistant
Copy link

CLAassistant commented Jul 24, 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, @cyrann
👏 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 24, 2018

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1808      +/-   ##
==========================================
+ Coverage    56.3%   56.47%   +0.16%     
==========================================
  Files         200      200              
  Lines       15657    15659       +2     
==========================================
+ Hits         8816     8843      +27     
+ Misses       5745     5724      -21     
+ Partials     1096     1092       -4
Flag Coverage Δ
#critest 33.54% <ø> (+0.06%) ⬆️
#integrationtest 37.72% <ø> (+0.06%) ⬆️
#unittest 20.39% <ø> (+0.06%) ⬆️
Impacted Files Coverage Δ
daemon/containerio/cio.go 62.5% <0%> (-1%) ⬇️
cri/v1alpha2/cri.go 66.13% <0%> (+0.17%) ⬆️
daemon/mgr/container.go 53.46% <0%> (+0.31%) ⬆️
ctrd/container.go 50.17% <0%> (+1.37%) ⬆️
ctrd/image.go 81.18% <0%> (+4.45%) ⬆️
daemon/config/config.go 33.33% <0%> (+11.11%) ⬆️

Signed-off-by: Erhuan <553614753@qq.com>
@zhuangqh
Copy link
Contributor

LGTM

@@ -53,5 +54,44 @@ func TestGetConflictConfigurations(t *testing.T) {
}

func TestGetUnknownFlags(t *testing.T) {
// TODO

Copy link
Contributor

Choose a reason for hiding this comment

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

remove redundant blank line here @cyrann


error = getUnknownFlags(flagSetNil, fileFlagsNil)
assert.Equal(error, nil)

Copy link
Contributor

Choose a reason for hiding this comment

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

also here

@zhuangqh zhuangqh added the LGTM one maintainer or community participant agrees to merge the pull reuqest. label Jul 24, 2018
@allencloud allencloud merged commit c80d878 into AliyunContainerService:master Jul 24, 2018
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/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[help wanted] add unit-test for daemon/config/getUnknownFlags
6 participants