Fix image deletion conflicts with search

Removed images were not cleaned up from the
digest-set that is used for the search index.

Fixes #18437

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: fcb083c6ac0fdb71e8db7a58f07a561342d631d3
Component: engine
This commit is contained in:
Tonis Tiigi
2015-12-04 13:15:54 -08:00
parent 339236ffdf
commit aedf5127c5
3 changed files with 44 additions and 2 deletions

View File

@ -348,11 +348,11 @@ func (s *DockerSuite) TestInspectByPrefix(c *check.C) {
c.Assert(err, checker.IsNil)
c.Assert(id, checker.HasPrefix, "sha256:")
id2, err := inspectField(id[:10], "Id")
id2, err := inspectField(id[:12], "Id")
c.Assert(err, checker.IsNil)
c.Assert(id, checker.Equals, id2)
id3, err := inspectField(strings.TrimPrefix(id, "sha256:")[:10], "Id")
id3, err := inspectField(strings.TrimPrefix(id, "sha256:")[:12], "Id")
c.Assert(err, checker.IsNil)
c.Assert(id, checker.Equals, id3)
}