mirror of
https://github.com/moby/buildkit.git
synced 2026-08-09 01:01:08 +00:00
This PR adds comprehensive Windows container support to BuildKit's integration test suite, enabling cross-platform testing while maintaining full Linux compatibility. - Updated 35+ integration tests to work on both Windows and Linux - Uses integration.UnixOrWindows() pattern for platform-specific logic - Windows: nanoserver images, cmd.exe commands, C:\ paths, CRLF handling - Linux: preserves existing alpine/busybox images and bash/sh commands - Added platform-specific adaptations for cache, export, frontend, and CLI tests - Files: 12 modified (+454/-151 lines) - Coverage: Major test categories now cross-platform compatible - Compatibility: 100% backward compatible, no breaking changes - CI: Enables Windows testing in BuildKit pipeline - Cache import/export (local, registry, multiple backends) - Image exporters (containerd, OCI, tar, metadata) - Dockerfile frontend parsing and builds - buildctl CLI functionality - Multi-stage builds and named contexts Tests requiring POSIX features (uid/gid, tmpfs, file modes) remain Linux-only. Signed-off-by: Dawei Wei <davwei@microsoft.com>
15 lines
256 B
Go
15 lines
256 B
Go
package main
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/moby/buildkit/util/testutil/integration"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func testDiskUsage(t *testing.T, sb integration.Sandbox) {
|
|
cmd := sb.Cmd("du")
|
|
err := cmd.Run()
|
|
require.NoError(t, err)
|
|
}
|