Refactor commit

The goal of this refactor is to make it easier to integrate buildkit
and containerd snapshotters.

Commit is used from two places (api and build), each calls it
with distinct arguments. Refactored to pull out the common commit
logic and provide different interfaces for each consumer.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: daff039049aea6e19a4bda1df2834d14b4198bc0
Component: engine
This commit is contained in:
Daniel Nephin
2018-02-07 15:09:06 -05:00
parent 0919d8f13e
commit 4ec1fd107e
10 changed files with 136 additions and 108 deletions
@@ -601,7 +601,7 @@ func (s *DockerSuite) TestEventsFilterType(c *check.C) {
events = strings.Split(strings.TrimSpace(out), "\n")
// Events generated by the container that builds the image
c.Assert(events, checker.HasLen, 3, check.Commentf("Events == %s", events))
c.Assert(events, checker.HasLen, 2, check.Commentf("Events == %s", events))
out, _ = dockerCmd(
c,