mirror of
https://github.com/moby/buildkit.git
synced 2026-08-09 09:11:45 +00:00
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:
6
cache/contenthash/checksum_test.go
vendored
6
cache/contenthash/checksum_test.go
vendored
@@ -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)
|
||||
|
||||
|
||||
9
cache/manager_test.go
vendored
9
cache/manager_test.go
vendored
@@ -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")
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user