mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-19 01:38:03 +08:00
tests: matrix with buildkit versions
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
@@ -12,6 +12,8 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
const defaultBuildKitTag = "buildx-stable-1"
|
||||
|
||||
func tmpdir(t *testing.T, appliers ...fstest.Applier) string {
|
||||
t.Helper()
|
||||
tmpdir := t.TempDir()
|
||||
@@ -107,3 +109,10 @@ func isExperimental() bool {
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func buildkitTag() string {
|
||||
if v := os.Getenv("TEST_BUILDKIT_TAG"); v != "" {
|
||||
return v
|
||||
}
|
||||
return defaultBuildKitTag
|
||||
}
|
||||
|
@@ -35,7 +35,7 @@ func TestIntegration(t *testing.T) {
|
||||
|
||||
func testIntegration(t *testing.T, funcs ...func(t *testing.T, sb integration.Sandbox)) {
|
||||
mirroredImages := integration.OfficialImages("busybox:latest", "alpine:latest")
|
||||
buildkitImage := "docker.io/moby/buildkit:buildx-stable-1"
|
||||
buildkitImage := "docker.io/moby/buildkit:" + buildkitTag()
|
||||
if bkworkers.IsTestDockerd() {
|
||||
if img, ok := os.LookupEnv("TEST_BUILDKIT_IMAGE"); ok {
|
||||
ref, err := reference.ParseNormalizedNamed(img)
|
||||
|
Reference in New Issue
Block a user