@@ -98,11 +98,18 @@ var _ = BeforeSuite(func() {
9898 ctx , cancel = context .WithCancel (ctrl .SetupSignalHandler ())
9999
100100 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" ))
101111 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 ,
106113 ErrorIfCRDPathMissing : true ,
107114 Config : & rest.Config {
108115 Host : fmt .Sprintf ("localhost:818%d" , GinkgoParallelProcess ()),
0 commit comments