Skip to content

Commit

Permalink
Add envtest config
Browse files Browse the repository at this point in the history
Signed-off-by: Mathieu Cesbron <[email protected]>
  • Loading branch information
MathieuCesbron committed Jan 11, 2024
1 parent e57531a commit 2375205
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions controllers/redis_controller_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package controllers
7 changes: 6 additions & 1 deletion controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package controllers

import (
"path/filepath"
"time"

redisv1beta2 "github.com/OT-CONTAINER-KIT/redis-operator/api/v1beta2"
. "github.com/onsi/ginkgo"
Expand Down Expand Up @@ -52,7 +53,11 @@ var _ = BeforeSuite(func() {

By("bootstrapping test environment")
testEnv = &envtest.Environment{
CRDDirectoryPaths: []string{filepath.Join("..", "config", "crd", "bases")},
CRDDirectoryPaths: []string{filepath.Join("..", "config", "crd", "bases")},
ErrorIfCRDPathMissing: true,
CRDInstallOptions: envtest.CRDInstallOptions{
MaxTime: 60 * time.Second,
},
}

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

0 comments on commit 2375205

Please sign in to comment.