Skip tests on Windows that attempt to bind-mount read-only

Containerd's mounter doesn't yet support bind-mounts on Windows.
BuildKit short-cuts this for read-write mounts, but not read-only
mounts.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
This commit is contained in:
Paul "TBBle" Hampson
2020-07-28 03:24:31 +10:00
parent e48eaf9619
commit b2d3473cba
3 changed files with 28 additions and 0 deletions

View File

@@ -7,6 +7,7 @@ import (
"io/ioutil"
"os"
"path/filepath"
"runtime"
"strings"
"testing"
"time"
@@ -858,6 +859,11 @@ func TestPersistence(t *testing.T) {
}
func createRef(t *testing.T, cm cache.Manager, files []string) cache.ImmutableRef {
if runtime.GOOS == "windows" && len(files) > 0 {
// lm.Mount() will fail
t.Skip("Depends on unimplemented containerd bind-mount support on Windows")
}
mref, err := cm.New(context.TODO(), nil, cache.CachePolicyRetain)
require.NoError(t, err)

View File

@@ -9,6 +9,7 @@ import (
"io/ioutil"
"os"
"path/filepath"
"runtime"
"testing"
"github.com/containerd/containerd/content"
@@ -269,6 +270,10 @@ func TestManager(t *testing.T) {
}
func TestSnapshotExtract(t *testing.T) {
if runtime.GOOS == "windows" {
t.Skip("Depends on unimplemented containerd bind-mount support on Windows")
}
t.Parallel()
ctx := namespaces.WithNamespace(context.Background(), "buildkit-test")
@@ -405,6 +410,10 @@ func TestSnapshotExtract(t *testing.T) {
}
func TestExtractOnMutable(t *testing.T) {
if runtime.GOOS == "windows" {
t.Skip("Depends on unimplemented containerd bind-mount support on Windows")
}
t.Parallel()
ctx := namespaces.WithNamespace(context.Background(), "buildkit-test")

View File

@@ -5,6 +5,7 @@ import (
"io/ioutil"
"os"
"path/filepath"
"runtime"
"testing"
"github.com/containerd/containerd/content/local"
@@ -25,6 +26,10 @@ import (
)
func TestHTTPSource(t *testing.T) {
if runtime.GOOS == "windows" {
t.Skip("Depends on unimplemented containerd bind-mount support on Windows")
}
t.Parallel()
ctx := context.TODO()
@@ -139,6 +144,10 @@ func TestHTTPSource(t *testing.T) {
}
func TestHTTPDefaultName(t *testing.T) {
if runtime.GOOS == "windows" {
t.Skip("Depends on unimplemented containerd bind-mount support on Windows")
}
t.Parallel()
ctx := context.TODO()
@@ -212,6 +221,10 @@ func TestHTTPInvalidURL(t *testing.T) {
}
func TestHTTPChecksum(t *testing.T) {
if runtime.GOOS == "windows" {
t.Skip("Depends on unimplemented containerd bind-mount support on Windows")
}
t.Parallel()
ctx := context.TODO()