and add unit tests for them. Signed-off-by: Daniel Nephin <dnephin@docker.com> Upstream-commit: c26e7d8c9105e16048268a01dd1e556af43902cd Component: engine