-
Notifications
You must be signed in to change notification settings - Fork 950
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: remove update image and fix bugs when update env #1196
bugfix: remove update image and fix bugs when update env #1196
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1196 +/- ##
==========================================
+ Coverage 15.57% 15.61% +0.04%
==========================================
Files 178 178
Lines 10454 10427 -27
==========================================
Hits 1628 1628
+ Misses 8706 8679 -27
Partials 120 120
|
daemon/mgr/container.go
Outdated
c.meta.Config.Image = ref | ||
c.meta.Image = ref | ||
if c.IsRunning() && len(config.Env) > 0 { | ||
return fmt.Errorf("Only can update the container's Env when it stopped") | ||
} | ||
|
||
if len(config.Env) != 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could remove this line of code, since the for loop below could handle the situation of config.Env has a length of 0.
e57ef60
to
ae47c9b
Compare
} | ||
|
||
command.PouchRun("rm", "-f", name).Assert(c, icmd.Success) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add an integration test to verify updating env for a running container? @HusterWan
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok!
ae47c9b
to
2eaac7a
Compare
Signed-off-by: Michael Wan <zirenwan@gmail.com>
2eaac7a
to
1060518
Compare
LGTM |
Signed-off-by: Michael Wan zirenwan@gmail.com
Ⅰ. Describe what this PR did
Ⅱ. Does this pull request fix one issue?
fixes #1188
Ⅲ. Describe how you did it
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews