@@ -98,11 +98,18 @@ var _ = BeforeSuite(func() {
98
98
ctx , cancel = context .WithCancel (ctrl .SetupSignalHandler ())
99
99
100
100
By ("bootstrapping test environment" )
101
+ operatorCrdsGlob := fmt .Sprintf (
102
+ "%s/%s" ,
103
+ build .Default .GOPATH ,
104
+ "pkg/mod/github.com/rabbitmq/cluster-operator/*/config/crd/bases" ,
105
+ )
106
+ operatorCrds , err := filepath .Glob (operatorCrdsGlob )
107
+ Expect (err ).ToNot (HaveOccurred ())
108
+ Expect (operatorCrds ).ToNot (BeEmpty ())
109
+
110
+ operatorCrds = append (operatorCrds , filepath .Join (".." , "config" , "crd" , "bases" ))
101
111
testEnv = & envtest.Environment {
102
- CRDDirectoryPaths : []string {
103
- filepath .Join (".." , "config" , "crd" , "bases" ),
104
- filepath .
Join (
build .
Default .
GOPATH ,
"pkg" ,
"mod" ,
"github.com" ,
"rabbitmq" ,
"cluster-operator" ,
"[email protected] " ,
"config" ,
"crd" ,
"bases" ),
105
- },
112
+ CRDDirectoryPaths : operatorCrds ,
106
113
ErrorIfCRDPathMissing : true ,
107
114
Config : & rest.Config {
108
115
Host : fmt .Sprintf ("localhost:818%d" , GinkgoParallelProcess ()),
0 commit comments