@@ -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+ config [bundle .BundleConfigInstallNamespaceKey ] = "install-namespace"
29+ config [bundle .BundleConfigWatchNamespaceKey ] = "watch-namespace"
30+ _ , err := converter .ToHelmChart (failingBundleSource , 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+ config [bundle .BundleConfigInstallNamespaceKey ] = "install-namespace"
54+ config [bundle .BundleConfigWatchNamespaceKey ] = ""
55+ _ , err := converter .ToHelmChart (b , 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+ config ["installNamespace" ] = "install-namespace"
71+ config ["watchNamespace" ] = ""
72+ _ , err := converter .ToHelmChart (b , 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+ config [bundle .BundleConfigInstallNamespaceKey ] = "install-namespace"
90+ config [bundle .BundleConfigWatchNamespaceKey ] = ""
91+ _ , err := converter .ToHelmChart (b , 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+ config [bundle .BundleConfigInstallNamespaceKey ] = "install-namespace"
109+ config [bundle .BundleConfigWatchNamespaceKey ] = ""
110+ _ , err := converter .ToHelmChart (b , 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+ config [bundle .BundleConfigInstallNamespaceKey ] = "install-namespace"
132+ config [bundle .BundleConfigWatchNamespaceKey ] = ""
133+ _ , err := converter .ToHelmChart (b , 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+ config [bundle .BundleConfigInstallNamespaceKey ] = expectedInstallNamespace
165+ config [bundle .BundleConfigWatchNamespaceKey ] = expectedWatchNamespace
166+ _ , err := converter .ToHelmChart (b , 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+ config [bundle .BundleConfigWatchNamespaceKey ] = ""
207+ config [bundle .BundleConfigInstallNamespaceKey ] = "install-namespace"
208+ chart , err := converter .ToHelmChart (b , config )
185209 require .NoError (t , err )
186210 require .NotNil (t , chart )
187211 require .NotNil (t , chart .Metadata )
0 commit comments