Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -385,9 +385,9 @@ $(LOCALBIN):
## Tool Binaries
CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen
CONTROLLER_GEN_VERSION = v0.18.0
ENVTEST_VERSION = v0.0.0-20240320141353-395cfc7486e6
ENVTEST_VERSION = latest
ENVTEST ?= $(LOCALBIN)/setup-envtest
ENVTEST_K8S_VERSION = 1.24.2
export ENVTEST_K8S_VERSION = 1.30.0

### controller-gen: Finds or downloads controller-gen
# download controller-gen if necessary
Expand Down
4 changes: 3 additions & 1 deletion controllers/controller/devworkspacerouting/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,16 @@ var _ = BeforeSuite(func() {
Expect(setupEnvVars()).To(Succeed())

By("bootstrapping test environment")
k8sVersion := os.Getenv("ENVTEST_K8S_VERSION")

testEnv = &envtest.Environment{
CRDDirectoryPaths: []string{
filepath.Join("..", "..", "..", "deploy", "templates", "crd", "bases"),
// Required to register OpenShift route CRD in testing environment
filepath.Join(".", "testdata", "route.crd.yaml"),
},
ErrorIfCRDPathMissing: true,
BinaryAssetsDirectory: filepath.Join("..", "..", "..", "bin", "k8s", fmt.Sprintf("1.24.2-%s-%s", runtime.GOOS, runtime.GOARCH)),
BinaryAssetsDirectory: filepath.Join("..", "..", "..", "bin", "k8s", fmt.Sprintf("%s-%s-%s", k8sVersion, runtime.GOOS, runtime.GOARCH)),
}

cfg, err := testEnv.Start()
Expand Down
Loading