-
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: can't stop a paused container #1269
bugfix: can't stop a paused container #1269
Conversation
@shaloulcy can you add some test case for your bugfix, thanks a lot! |
Codecov Report
@@ Coverage Diff @@
## master #1269 +/- ##
==========================================
+ Coverage 15.21% 15.26% +0.04%
==========================================
Files 172 172
Lines 10734 10699 -35
==========================================
Hits 1633 1633
+ Misses 8980 8946 -34
+ Partials 121 120 -1
|
c13ecee
to
45e24b7
Compare
769750d
to
f1dc4ff
Compare
@@ -695,7 +696,7 @@ func (mgr *ContainerManager) Stop(ctx context.Context, name string, timeout int6 | |||
c.Lock() | |||
defer c.Unlock() | |||
|
|||
if !c.IsRunning() { | |||
if !c.IsRunning() && !c.IsPaused() { |
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.
maybe we should also check Restart
interface
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.
done it
@@ -67,3 +68,31 @@ func (suite *APIContainerStopSuite) TestInvalidParam(c *check.C) { | |||
//TODO | |||
// 1. invalid timeout value | |||
} | |||
|
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.
thanks for adding api test case, it will be great to add more test for cli test :)
e522d01
to
5b307ca
Compare
can't stop a paused container after restart pouch, can't unpause a paused container Signed-off-by: Eric Li <lcy041536@gmail.com>
LGTM |
can't stop a paused container
after restart pouch, can't unpause a paused container
Signed-off-by: Eric Li lcy041536@gmail.com
Ⅰ. Describe what this PR did
fixes #1268
Ⅱ. Does this pull request fix one issue?
Ⅲ. Describe how you did it
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews