fixup! fixup! fixup! More fixes, moving from python to golang worker.

This commit is contained in:
2025-12-18 01:36:52 +00:00
parent 56b0b615b2
commit e777881f23
4 changed files with 25 additions and 10 deletions
+10 -8
View File
@@ -19,6 +19,7 @@ package raczylocom
import (
"context"
"fmt"
"os"
"path/filepath"
"runtime"
"testing"
@@ -58,17 +59,18 @@ var _ = BeforeSuite(func() {
ctx, cancel = context.WithCancel(context.TODO())
By("bootstrapping test environment")
// Use KUBEBUILDER_ASSETS if set (CI), otherwise fall back to local path
binaryAssetsDir := os.Getenv("KUBEBUILDER_ASSETS")
if binaryAssetsDir == "" {
binaryAssetsDir = filepath.Join("..", "..", "..", "bin", "k8s",
fmt.Sprintf("1.31.0-%s-%s", runtime.GOOS, runtime.GOARCH))
}
testEnv = &envtest.Environment{
CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "config", "crd", "bases")},
ErrorIfCRDPathMissing: true,
// The BinaryAssetsDirectory is only required if you want to run the tests directly
// without call the makefile target test. If not informed it will look for the
// default path defined in controller-runtime which is /usr/local/kubebuilder/.
// Note that you must have the required binaries setup under the bin directory to perform
// the tests directly. When we run make test it will be setup and used automatically.
BinaryAssetsDirectory: filepath.Join("..", "..", "..", "bin", "k8s",
fmt.Sprintf("1.31.0-%s-%s", runtime.GOOS, runtime.GOARCH)),
BinaryAssetsDirectory: binaryAssetsDir,
}
var err error