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

config: remove check unknown flag in config file #2161

Merged
merged 1 commit into from
Aug 27, 2018
Merged

config: remove check unknown flag in config file #2161

merged 1 commit into from
Aug 27, 2018

Conversation

Ace-Tang
Copy link
Contributor

  1. daemon config come from two part, one is command flag, the other
    is from config file, but the flags from two part can not keep
    consistent,so remove unknow flags check.
  2. flatten 'key-value' in config file, check flags conflict between
    command line and file.

Signed-off-by: Ace-Tang aceapril@126.com

Ⅰ. Describe what this PR did

Ⅱ. Does this pull request fix one issue?

Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

1. daemon config come from two part, one is command flag, the other
is from config file, but the flags from two part can not keep
consistent,so remove unknow flags check.
2. flatten 'key-value' in config file, check flags conflict between
command line and file.

Signed-off-by: Ace-Tang <aceapril@126.com>
@codecov-io
Copy link

codecov-io commented Aug 26, 2018

Codecov Report

Merging #2161 into master will decrease coverage by 0.06%.
The diff coverage is 80%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2161      +/-   ##
==========================================
- Coverage   64.41%   64.35%   -0.07%     
==========================================
  Files         209      209              
  Lines       16669    16659      -10     
==========================================
- Hits        10738    10721      -17     
- Misses       4603     4607       +4     
- Partials     1328     1331       +3
Flag Coverage Δ
#criv1alpha1test 32.79% <0%> (-0.17%) ⬇️
#criv1alpha2test 33.59% <0%> (+0.03%) ⬆️
#integrationtest 39.28% <0%> (+0.01%) ⬆️
#unittest 23.81% <80%> (-0.04%) ⬇️
Impacted Files Coverage Δ
daemon/config/config.go 44.28% <80%> (-4.47%) ⬇️
ctrd/watch.go 72.72% <0%> (-7.58%) ⬇️
apis/server/utils.go 61.9% <0%> (-4.77%) ⬇️
cri/v1alpha1/cri.go 63.02% <0%> (-0.7%) ⬇️
daemon/mgr/container.go 56.71% <0%> (-0.21%) ⬇️
cri/v1alpha2/cri.go 64.34% <0%> (+0.33%) ⬆️
daemon/logger/jsonfile/utils.go 73.17% <0%> (+1.62%) ⬆️

@@ -182,23 +182,6 @@ func (suite *PouchDaemonSuite) TestDaemonSliceFlagNotConflict(c *check.C) {
c.Assert(err, check.IsNil)
}

// TestDaemonConfigFileUnknownFlag tests start daemon with unknown flags in configure file.
func (suite *PouchDaemonSuite) TestDaemonConfigFileUnknownFlag(c *check.C) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why delete this test case ?

@rudyfly
Copy link
Collaborator

rudyfly commented Aug 27, 2018

LGTM

@pouchrobot pouchrobot added the LGTM one maintainer or community participant agrees to merge the pull reuqest. label Aug 27, 2018
@allencloud allencloud merged commit 27bbb23 into AliyunContainerService:master Aug 27, 2018
@allencloud allencloud changed the title config: remove check unknow flag in config file config: remove check unknown flag in config file Aug 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

6 participants