@@ -36,6 +36,8 @@ import (
3636 "sigs.k8s.io/controller-runtime/pkg/manager"
3737 "sigs.k8s.io/controller-runtime/pkg/metrics/server"
3838
39+ consolev1alpha "github.com/openshift/api/console/v1alpha1"
40+
3941 remediationv1alpha1 "github.com/medik8s/node-healthcheck-operator/api/v1alpha1"
4042)
4143
@@ -63,7 +65,13 @@ var _ = BeforeSuite(func() {
6365
6466 By ("bootstrapping test environment" )
6567 testEnv = & envtest.Environment {
66- CRDDirectoryPaths : []string {filepath .Join (".." , ".." , "config" , "crd" , "bases" )},
68+ CRDInstallOptions : envtest.CRDInstallOptions {
69+ Paths : []string {
70+ filepath .Join (".." , ".." , "vendor" , "github.com" , "openshift" , "api" , "console" , "v1alpha1" ),
71+ filepath .Join (".." , ".." , "config" , "crd" , "bases" ),
72+ },
73+ ErrorIfPathMissing : true ,
74+ },
6775 }
6876
6977 var err error
@@ -72,8 +80,8 @@ var _ = BeforeSuite(func() {
7280 Expect (cfg ).NotTo (BeNil ())
7381
7482 scheme .AddToScheme (scheme .Scheme )
75- err = remediationv1alpha1 .AddToScheme (scheme .Scheme )
76- Expect (err ).NotTo (HaveOccurred ())
83+ Expect ( remediationv1alpha1 .AddToScheme (scheme .Scheme )). NotTo ( HaveOccurred () )
84+ Expect (consolev1alpha . AddToScheme ( scheme . Scheme ) ).NotTo (HaveOccurred ())
7785
7886 k8sClient , err = client .New (cfg , client.Options {Scheme : scheme .Scheme })
7987 Expect (err ).NotTo (HaveOccurred ())
0 commit comments