@@ -24,7 +24,10 @@ func Test_BundleToHelmChartConverter_ToHelmChart_ReturnsBundleSourceFailures(t *
2424 var failingBundleSource FakeBundleSource = func () (bundle.RegistryV1 , error ) {
2525 return bundle.RegistryV1 {}, errors .New ("some error" )
2626 }
27- _ , err := converter .ToHelmChart (failingBundleSource , "install-namespace" , "watch-namespace" )
27+ config := map [string ]interface {}{
28+ bundle .BundleConfigWatchNamespaceKey : "watch-namespace" ,
29+ }
30+ _ , err := converter .ToHelmChart (failingBundleSource , "install-namespace" , config )
2831 require .Error (t , err )
2932 require .Contains (t , err .Error (), "some error" )
3033}
@@ -46,7 +49,10 @@ func Test_BundleToHelmChartConverter_ToHelmChart_ReturnsBundleRendererFailures(t
4649 },
4750 )
4851
49- _ , err := converter .ToHelmChart (b , "install-namespace" , "" )
52+ config := map [string ]interface {}{
53+ bundle .BundleConfigWatchNamespaceKey : "" ,
54+ }
55+ _ , err := converter .ToHelmChart (b , "install-namespace" , config )
5056 require .Error (t , err )
5157 require .Contains (t , err .Error (), "some error" )
5258}
@@ -60,7 +66,10 @@ func Test_BundleToHelmChartConverter_ToHelmChart_NoAPIServiceDefinitions(t *test
6066 },
6167 )
6268
63- _ , err := converter .ToHelmChart (b , "install-namespace" , "" )
69+ config := map [string ]interface {}{
70+ bundle .BundleConfigWatchNamespaceKey : "" ,
71+ }
72+ _ , err := converter .ToHelmChart (b , "install-namespace" , config )
6473 require .Error (t , err )
6574 require .Contains (t , err .Error (), "unsupported bundle: apiServiceDefintions are not supported" )
6675}
@@ -76,7 +85,10 @@ func Test_BundleToHelmChartConverter_ToHelmChart_NoWebhooksWithoutCertProvider(t
7685 },
7786 )
7887
79- _ , err := converter .ToHelmChart (b , "install-namespace" , "" )
88+ config := map [string ]interface {}{
89+ bundle .BundleConfigWatchNamespaceKey : "" ,
90+ }
91+ _ , err := converter .ToHelmChart (b , "install-namespace" , config )
8092 require .Error (t , err )
8193 require .Contains (t , err .Error (), "webhookDefinitions are not supported" )
8294}
@@ -92,7 +104,10 @@ func Test_BundleToHelmChartConverter_ToHelmChart_WebhooksSupportDisabled(t *test
92104 },
93105 )
94106
95- _ , err := converter .ToHelmChart (b , "install-namespace" , "" )
107+ config := map [string ]interface {}{
108+ bundle .BundleConfigWatchNamespaceKey : "" ,
109+ }
110+ _ , err := converter .ToHelmChart (b , "install-namespace" , config )
96111 require .Error (t , err )
97112 require .Contains (t , err .Error (), "webhookDefinitions are not supported" )
98113}
@@ -112,7 +127,10 @@ func Test_BundleToHelmChartConverter_ToHelmChart_WebhooksWithCertProvider(t *tes
112127 },
113128 )
114129
115- _ , err := converter .ToHelmChart (b , "install-namespace" , "" )
130+ config := map [string ]interface {}{
131+ bundle .BundleConfigWatchNamespaceKey : "" ,
132+ }
133+ _ , err := converter .ToHelmChart (b , "install-namespace" , config )
116134 require .NoError (t , err )
117135}
118136
@@ -142,7 +160,10 @@ func Test_BundleToHelmChartConverter_ToHelmChart_BundleRendererIntegration(t *te
142160 },
143161 )
144162
145- _ , err := converter .ToHelmChart (b , expectedInstallNamespace , expectedWatchNamespace )
163+ config := map [string ]interface {}{
164+ bundle .BundleConfigWatchNamespaceKey : expectedWatchNamespace ,
165+ }
166+ _ , err := converter .ToHelmChart (b , expectedInstallNamespace , config )
146167 require .NoError (t , err )
147168}
148169
@@ -181,7 +202,10 @@ func Test_BundleToHelmChartConverter_ToHelmChart_Success(t *testing.T) {
181202 },
182203 )
183204
184- chart , err := converter .ToHelmChart (b , "install-namespace" , "" )
205+ config := map [string ]interface {}{
206+ bundle .BundleConfigWatchNamespaceKey : "" ,
207+ }
208+ chart , err := converter .ToHelmChart (b , "install-namespace" , config )
185209 require .NoError (t , err )
186210 require .NotNil (t , chart )
187211 require .NotNil (t , chart .Metadata )
0 commit comments