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

bugfix: fix map type can not be merged #1367

Merged
merged 1 commit into from
May 24, 2018
Merged

bugfix: fix map type can not be merged #1367

merged 1 commit into from
May 24, 2018

Conversation

Ace-Tang
Copy link
Contributor

@Ace-Tang Ace-Tang commented May 21, 2018

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

Ⅰ. Describe what this PR did

fix map type in daemon config can not be merged.

Ⅱ. Does this pull request fix one issue?

Ⅲ. Describe how you did it

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@pouchrobot pouchrobot added kind/bug This is bug report for project size/S labels May 21, 2018
@codecov-io
Copy link

Codecov Report

Merging #1367 into master will increase coverage by 0.06%.
The diff coverage is 33.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1367      +/-   ##
==========================================
+ Coverage   17.29%   17.35%   +0.06%     
==========================================
  Files         190      189       -1     
  Lines       11913    11836      -77     
==========================================
- Hits         2060     2054       -6     
+ Misses       9706     9634      -72     
- Partials      147      148       +1
Impacted Files Coverage Δ
pkg/utils/utils.go 71.85% <33.33%> (-0.54%) ⬇️
cli/pause.go 0% <0%> (ø) ⬆️
cli/start.go 0% <0%> (ø) ⬆️
cli/unpause.go 0% <0%> (ø) ⬆️
cli/rm.go 0% <0%> (ø) ⬆️
cli/restart.go 0% <0%> (ø) ⬆️
daemon/mgr/container.go 0% <0%> (ø) ⬆️
cli/rmi.go 0% <0%> (ø) ⬆️
apis/opts/env.go

if !srcElem.IsValid() || isEmptyValue(srcElem) {
continue
}
if dest.IsNil() {
Copy link
Contributor

Choose a reason for hiding this comment

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

@Ace-Tang Add a test case to cover this statement?
like

{
	src:      &simple{Sd: map[string]string{"go": "gogo"}},
	dest:     &simple{},
	expected: &simple{Sd: map[string]string{"go": "gogo"}},
	ok:       true,
},

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Already add the test. @zhuangqh

Copy link
Contributor Author

Choose a reason for hiding this comment

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

cri-test alway fails to pull image.

add more merge map test

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

Hi, @zhuangqh , I will merge this for #1366 need this function.

@Ace-Tang Ace-Tang merged commit feb98c0 into AliyunContainerService:master May 24, 2018
@Ace-Tang Ace-Tang deleted the fix_merge_map branch May 24, 2018 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug This is bug report for project size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants