@@ -13,8 +13,10 @@ import (
13
13
"time"
14
14
15
15
"github.com/sirupsen/logrus"
16
+ log "github.com/sirupsen/logrus"
16
17
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
17
18
utilclock "k8s.io/apimachinery/pkg/util/clock"
19
+ "k8s.io/client-go/tools/clientcmd"
18
20
19
21
v1 "github.com/operator-framework/operator-lifecycle-manager/pkg/api/apis/operators/v1"
20
22
"github.com/operator-framework/operator-lifecycle-manager/pkg/api/client"
@@ -73,6 +75,11 @@ func TestMain(m *testing.M) {
73
75
ctx , cancel := context .WithCancel (signals .Context ())
74
76
defer cancel ()
75
77
78
+ config , err := clientcmd .BuildConfigFromFlags ("" , * kubeConfigPath )
79
+ if err != nil {
80
+ log .Fatalf ("error configuring client: %s" , err .Error ())
81
+ }
82
+
76
83
// operator dependencies
77
84
crClient , err := client .NewClient (* kubeConfigPath )
78
85
if err != nil {
@@ -116,6 +123,7 @@ func TestMain(m *testing.M) {
116
123
olm .WithResyncPeriod (time .Minute ),
117
124
olm .WithExternalClient (crClient ),
118
125
olm .WithOperatorClient (olmOpClient ),
126
+ olm .WithRestConfig (config ),
119
127
)
120
128
if err != nil {
121
129
logrus .WithError (err ).Fatalf ("error configuring olm" )
0 commit comments