Use BuildKit when building integration tests headscale containers

This commit is contained in:
Juan Font Alonso
2022-07-31 10:37:49 +02:00
parent f9c4d577e2
commit 0f3dc9de4e
3 changed files with 18 additions and 0 deletions

View File

@@ -14,6 +14,7 @@ import (
"net/http"
"os"
"path"
"runtime"
"strings"
"sync"
"testing"
@@ -227,9 +228,13 @@ func (s *IntegrationTestSuite) SetupSuite() {
s.FailNow(fmt.Sprintf("Could not create network: %s", err), "")
}
platform := fmt.Sprintf("%s/%s", runtime.GOOS, runtime.GOARCH)
headscaleBuildOptions := &dockertest.BuildOptions{
Dockerfile: "Dockerfile",
ContextDir: ".",
Platform: platform,
Version: "2",
}
currentPath, err := os.Getwd()
@@ -244,6 +249,7 @@ func (s *IntegrationTestSuite) SetupSuite() {
},
Networks: []*dockertest.Network{&s.network},
Cmd: []string{"headscale", "serve"},
Platform: platform,
}
err = s.pool.RemoveContainerByName(headscaleHostname)