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:
Paul "TBBle" Hampson
2020-07-18 03:42:14 +10:00
parent a64a76846c
commit c7504987e6
7 changed files with 258 additions and 11 deletions

View File

@@ -20,7 +20,6 @@ import (
"archive/tar"
"bytes"
"io"
"runtime"
"testing"
. "github.com/containerd/containerd"
@@ -30,8 +29,7 @@ import (
// TestExport exports testImage as a tar stream
func TestExport(t *testing.T) {
// TODO: support windows
if testing.Short() || runtime.GOOS == "windows" {
if testing.Short() {
t.Skip()
}
ctx, cancel := testContext(t)