Implement windowsDiff.Compare via hcsshim/pkg/ociwclayer
This parallels the implementation of windowsDiff.Apply, including bouncing very briefly though archive.WriteDiff and then straight back out into Windows-specific code. It's mostly pulling existing mechanisms from non-Windows Compare or Windows Apply, and highlights that there's probably a lot of scope for refactoring on top of this. Now the export-related integration tests pass CI on Windows. Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
This commit is contained in:
@@ -70,7 +70,7 @@ func TestOverlayApplyNoParents(t *testing.T) {
|
||||
}
|
||||
fstest.FSSuite(t, overlayDiffApplier{
|
||||
tmp: base,
|
||||
diff: func(ctx context.Context, w io.Writer, a, b string) error {
|
||||
diff: func(ctx context.Context, w io.Writer, a, b string, _ ...WriteDiffOpt) error {
|
||||
cw := newChangeWriter(w, b)
|
||||
cw.addedDirs = nil
|
||||
err := fs.Changes(ctx, a, b, cw.HandleChange)
|
||||
@@ -85,7 +85,7 @@ func TestOverlayApplyNoParents(t *testing.T) {
|
||||
|
||||
type overlayDiffApplier struct {
|
||||
tmp string
|
||||
diff func(context.Context, io.Writer, string, string) error
|
||||
diff func(context.Context, io.Writer, string, string, ...WriteDiffOpt) error
|
||||
t *testing.T
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user