@@ -24,7 +24,7 @@ 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+ _ , err := converter .ToHelmChart (failingBundleSource , "install-namespace" , map [ string ] interface {}{ "watchNamespace" : " watch-namespace"} )
2828 require .Error (t , err )
2929 require .Contains (t , err .Error (), "some error" )
3030}
@@ -46,7 +46,7 @@ func Test_BundleToHelmChartConverter_ToHelmChart_ReturnsBundleRendererFailures(t
4646 },
4747 )
4848
49- _ , err := converter .ToHelmChart (b , "install-namespace" , "" )
49+ _ , err := converter .ToHelmChart (b , "install-namespace" , map [ string ] interface {}{ "watchNamespace" : "" } )
5050 require .Error (t , err )
5151 require .Contains (t , err .Error (), "some error" )
5252}
@@ -56,11 +56,14 @@ func Test_BundleToHelmChartConverter_ToHelmChart_NoAPIServiceDefinitions(t *test
5656
5757 b := source .FromBundle (
5858 bundle.RegistryV1 {
59- CSV : MakeCSV (WithOwnedAPIServiceDescriptions (v1alpha1.APIServiceDescription {})),
59+ CSV : MakeCSV (
60+ WithInstallModeSupportFor (v1alpha1 .InstallModeTypeAllNamespaces ),
61+ WithOwnedAPIServiceDescriptions (v1alpha1.APIServiceDescription {}),
62+ ),
6063 },
6164 )
6265
63- _ , err := converter .ToHelmChart (b , "install-namespace" , "" )
66+ _ , err := converter .ToHelmChart (b , "install-namespace" , map [ string ] interface {}{ "watchNamespace" : "" } )
6467 require .Error (t , err )
6568 require .Contains (t , err .Error (), "unsupported bundle: apiServiceDefintions are not supported" )
6669}
@@ -72,11 +75,14 @@ func Test_BundleToHelmChartConverter_ToHelmChart_NoWebhooksWithoutCertProvider(t
7275
7376 b := source .FromBundle (
7477 bundle.RegistryV1 {
75- CSV : MakeCSV (WithWebhookDefinitions (v1alpha1.WebhookDescription {})),
78+ CSV : MakeCSV (
79+ WithInstallModeSupportFor (v1alpha1 .InstallModeTypeAllNamespaces ),
80+ WithWebhookDefinitions (v1alpha1.WebhookDescription {}),
81+ ),
7682 },
7783 )
7884
79- _ , err := converter .ToHelmChart (b , "install-namespace" , "" )
85+ _ , err := converter .ToHelmChart (b , "install-namespace" , map [ string ] interface {}{ "watchNamespace" : "" } )
8086 require .Error (t , err )
8187 require .Contains (t , err .Error (), "webhookDefinitions are not supported" )
8288}
@@ -88,11 +94,14 @@ func Test_BundleToHelmChartConverter_ToHelmChart_WebhooksSupportDisabled(t *test
8894
8995 b := source .FromBundle (
9096 bundle.RegistryV1 {
91- CSV : MakeCSV (WithWebhookDefinitions (v1alpha1.WebhookDescription {})),
97+ CSV : MakeCSV (
98+ WithInstallModeSupportFor (v1alpha1 .InstallModeTypeAllNamespaces ),
99+ WithWebhookDefinitions (v1alpha1.WebhookDescription {}),
100+ ),
92101 },
93102 )
94103
95- _ , err := converter .ToHelmChart (b , "install-namespace" , "" )
104+ _ , err := converter .ToHelmChart (b , "install-namespace" , map [ string ] interface {}{ "watchNamespace" : "" } )
96105 require .Error (t , err )
97106 require .Contains (t , err .Error (), "webhookDefinitions are not supported" )
98107}
@@ -112,7 +121,7 @@ func Test_BundleToHelmChartConverter_ToHelmChart_WebhooksWithCertProvider(t *tes
112121 },
113122 )
114123
115- _ , err := converter .ToHelmChart (b , "install-namespace" , "" )
124+ _ , err := converter .ToHelmChart (b , "install-namespace" , map [ string ] interface {}{ "watchNamespace" : "" } )
116125 require .NoError (t , err )
117126}
118127
@@ -142,7 +151,7 @@ func Test_BundleToHelmChartConverter_ToHelmChart_BundleRendererIntegration(t *te
142151 },
143152 )
144153
145- _ , err := converter .ToHelmChart (b , expectedInstallNamespace , expectedWatchNamespace )
154+ _ , err := converter .ToHelmChart (b , expectedInstallNamespace , map [ string ] interface {}{ "watchNamespace" : expectedWatchNamespace } )
146155 require .NoError (t , err )
147156}
148157
@@ -181,7 +190,7 @@ func Test_BundleToHelmChartConverter_ToHelmChart_Success(t *testing.T) {
181190 },
182191 )
183192
184- chart , err := converter .ToHelmChart (b , "install-namespace" , "" )
193+ chart , err := converter .ToHelmChart (b , "install-namespace" , map [ string ] interface {}{ "watchNamespace" : "" } )
185194 require .NoError (t , err )
186195 require .NotNil (t , chart )
187196 require .NotNil (t , chart .Metadata )
0 commit comments