@@ -19,10 +19,9 @@ import (
1919var _ = Describe ("HaveACMHub" , func () {
2020
2121 var (
22- patternReconciler * PatternReconciler
23- fakeClient client.Client
24- configMap * v1.ConfigMap
25- hub * unstructured.Unstructured
22+ fakeClient client.Client
23+ configMap * v1.ConfigMap
24+ hub * unstructured.Unstructured
2625 )
2726 BeforeEach (func () {
2827 configMap = & v1.ConfigMap {
@@ -51,11 +50,8 @@ var _ = Describe("HaveACMHub", func() {
5150 It ("should return true" , func () {
5251 fakeClient = fake .NewClientBuilder ().WithScheme (testEnv .Scheme ).
5352 WithRuntimeObjects (configMap , hub ).Build ()
54- patternReconciler = & PatternReconciler {
55- Client : fakeClient ,
56- }
5753
58- result := haveACMHub (patternReconciler )
54+ result := haveACMHub (fakeClient )
5955 Expect (result ).To (BeTrue ())
6056 })
6157 })
@@ -66,11 +62,8 @@ var _ = Describe("HaveACMHub", func() {
6662
6763 fakeClient = fake .NewClientBuilder ().WithScheme (testEnv .Scheme ).
6864 WithRuntimeObjects (configMap , hub ).Build ()
69- patternReconciler = & PatternReconciler {
70- Client : fakeClient ,
71- }
7265
73- result := haveACMHub (patternReconciler )
66+ result := haveACMHub (fakeClient )
7467 Expect (result ).To (BeFalse ())
7568 })
7669 })
@@ -79,11 +72,8 @@ var _ = Describe("HaveACMHub", func() {
7972 It ("should return false" , func () {
8073 fakeClient = fake .NewClientBuilder ().WithScheme (testEnv .Scheme ).
8174 WithRuntimeObjects ().Build ()
82- patternReconciler = & PatternReconciler {
83- Client : fakeClient ,
84- }
8575
86- result := haveACMHub (patternReconciler )
76+ result := haveACMHub (fakeClient )
8777 Expect (result ).To (BeFalse ())
8878 })
8979 })
@@ -95,11 +85,7 @@ var _ = Describe("HaveACMHub", func() {
9585 return fmt .Errorf ("list error" )
9686 }}).WithScheme (testEnv .Scheme ).Build ()
9787
98- patternReconciler = & PatternReconciler {
99- Client : fakeClient ,
100- }
101-
102- result := haveACMHub (patternReconciler )
88+ result := haveACMHub (fakeClient )
10389 Expect (result ).To (BeFalse ())
10490 })
10591 })
@@ -111,11 +97,7 @@ var _ = Describe("HaveACMHub", func() {
11197 return fmt .Errorf ("list error" )
11298 }}).WithScheme (testEnv .Scheme ).WithRuntimeObjects (configMap ).Build ()
11399
114- patternReconciler = & PatternReconciler {
115- Client : fakeClient ,
116- }
117-
118- result := haveACMHub (patternReconciler )
100+ result := haveACMHub (fakeClient )
119101 Expect (result ).To (BeFalse ())
120102 })
121103 })
0 commit comments