graph: add parent img refcount for faster rmi
also fix a typo in pkg/truncindex package comment Signed-off-by: Antonio Murdaca <runcom@redhat.com> Upstream-commit: 56f5e3459f8d7477d2aa60dee02bc7cd8a8731ad Component: engine
This commit is contained in:
committed by
Antonio Murdaca
parent
f13bda05a2
commit
d7d07ab148
@ -284,3 +284,15 @@ RUN echo 2 #layer2
|
||||
// should be allowed to untag with the -f flag
|
||||
c.Assert(out, checker.Contains, fmt.Sprintf("Untagged: %s:latest", newTag))
|
||||
}
|
||||
|
||||
func (*DockerSuite) TestRmiParentImageFail(c *check.C) {
|
||||
testRequires(c, DaemonIsLinux)
|
||||
|
||||
parent, err := inspectField("busybox", "Parent")
|
||||
c.Assert(err, check.IsNil)
|
||||
out, _, err := dockerCmdWithError("rmi", parent)
|
||||
c.Assert(err, check.NotNil)
|
||||
if !strings.Contains(out, "image has dependent child images") {
|
||||
c.Fatalf("rmi should have failed because it's a parent image, got %s", out)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user