-
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
feature: add container prune command #2856
feature: add container prune command #2856
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2856 +/- ##
==========================================
+ Coverage 67.21% 67.23% +0.02%
==========================================
Files 291 293 +2
Lines 18238 18284 +46
==========================================
+ Hits 12258 12294 +36
- Misses 4525 4527 +2
- Partials 1455 1463 +8
|
ad1204b
to
ee355b8
Compare
continue | ||
} | ||
|
||
if c.SizeRw > 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.
Here, I take c.SizeRw
as reclaimed space. is it right?
0926c4d
to
8e73f56
Compare
} | ||
|
||
// TestContainerPruneWork tests "pouch container prune" work. | ||
func (suite *PouchContainerPruneSuite) TestContainerPruneWork(c *check.C) { |
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 we add a test case for filter usage?
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.
all right
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.
why only add invalid test case here?
8e73f56
to
12931a1
Compare
d896678
to
97fd21f
Compare
@@ -33,6 +33,11 @@ func (c *Container) IsRemoving() bool { | |||
return c.State.Status == types.StatusRemoving | |||
} | |||
|
|||
// IsStopped returns container is stopped or not. | |||
func (c *Container) IsStopped() bool { |
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.
just to confirm, does docker only delete stopped container?
97fd21f
to
5ad2d95
Compare
Signed-off-by: Junjun Li <junjunli666@gmail.com>
5ad2d95
to
364fa0e
Compare
|
Signed-off-by: Junjun Li junjunli666@gmail.com
Ⅰ. Describe what this PR did
add
pouch container prune
commandⅡ. Does this pull request fix one issue?
#2213
Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews