@@ -21,6 +21,7 @@ import (
2121 "github.com/operator-framework/operator-controller/internal/operator-controller/rukpak/bundle/source"
2222 "github.com/operator-framework/operator-controller/internal/operator-controller/rukpak/render"
2323 . "github.com/operator-framework/operator-controller/internal/operator-controller/rukpak/util/testing"
24+ "github.com/operator-framework/operator-controller/internal/operator-controller/rukpak/util/testing/clusterserviceversion"
2425)
2526
2627func Test_RegistryV1HelmChartProvider_Get_ReturnsBundleSourceFailures (t * testing.T ) {
@@ -51,7 +52,7 @@ func Test_RegistryV1HelmChartProvider_Get_ReturnsBundleRendererFailures(t *testi
5152
5253 b := source .FromBundle (
5354 bundle.RegistryV1 {
54- CSV : MakeCSV ( WithInstallModeSupportFor (v1alpha1 .InstallModeTypeAllNamespaces )),
55+ CSV : clusterserviceversion . Builder (). WithInstallModeSupportFor (v1alpha1 .InstallModeTypeAllNamespaces ). Build ( ),
5556 },
5657 )
5758
@@ -70,7 +71,7 @@ func Test_RegistryV1HelmChartProvider_Get_NoAPIServiceDefinitions(t *testing.T)
7071
7172 b := source .FromBundle (
7273 bundle.RegistryV1 {
73- CSV : MakeCSV ( WithOwnedAPIServiceDescriptions (v1alpha1.APIServiceDescription {})),
74+ CSV : clusterserviceversion . Builder (). WithOwnedAPIServiceDescriptions (v1alpha1.APIServiceDescription {}). Build ( ),
7475 },
7576 )
7677
@@ -91,7 +92,7 @@ func Test_RegistryV1HelmChartProvider_Get_SingleOwnNamespace(t *testing.T) {
9192
9293 b := source .FromBundle (
9394 bundle.RegistryV1 {
94- CSV : MakeCSV ( WithInstallModeSupportFor (v1alpha1 .InstallModeTypeOwnNamespace )),
95+ CSV : clusterserviceversion . Builder (). WithInstallModeSupportFor (v1alpha1 .InstallModeTypeOwnNamespace ). Build ( ),
9596 },
9697 )
9798
@@ -114,7 +115,7 @@ func Test_RegistryV1HelmChartProvider_Get_SingleOwnNamespace(t *testing.T) {
114115
115116 b := source .FromBundle (
116117 bundle.RegistryV1 {
117- CSV : MakeCSV ( WithInstallModeSupportFor (v1alpha1 .InstallModeTypeSingleNamespace )),
118+ CSV : clusterserviceversion . Builder (). WithInstallModeSupportFor (v1alpha1 .InstallModeTypeSingleNamespace ). Build ( ),
118119 },
119120 )
120121
@@ -142,7 +143,7 @@ func Test_RegistryV1HelmChartProvider_Get_SingleOwnNamespace(t *testing.T) {
142143
143144 b := source .FromBundle (
144145 bundle.RegistryV1 {
145- CSV : MakeCSV ( WithInstallModeSupportFor (v1alpha1 .InstallModeTypeOwnNamespace )),
146+ CSV : clusterserviceversion . Builder (). WithInstallModeSupportFor (v1alpha1 .InstallModeTypeOwnNamespace ). Build ( ),
146147 },
147148 )
148149
@@ -164,7 +165,7 @@ func Test_RegistryV1HelmChartProvider_Get_NoWebhooksWithoutCertProvider(t *testi
164165
165166 b := source .FromBundle (
166167 bundle.RegistryV1 {
167- CSV : MakeCSV ( WithWebhookDefinitions (v1alpha1.WebhookDescription {})),
168+ CSV : clusterserviceversion . Builder (). WithWebhookDefinitions (v1alpha1.WebhookDescription {}). Build ( ),
168169 },
169170 )
170171
@@ -186,7 +187,7 @@ func Test_RegistryV1HelmChartProvider_Get_WebhooksSupportDisabled(t *testing.T)
186187
187188 b := source .FromBundle (
188189 bundle.RegistryV1 {
189- CSV : MakeCSV ( WithWebhookDefinitions (v1alpha1.WebhookDescription {})),
190+ CSV : clusterserviceversion . Builder (). WithWebhookDefinitions (v1alpha1.WebhookDescription {}). Build ( ),
190191 },
191192 )
192193
@@ -209,10 +210,9 @@ func Test_RegistryV1HelmChartProvider_Get_WebhooksWithCertProvider(t *testing.T)
209210
210211 b := source .FromBundle (
211212 bundle.RegistryV1 {
212- CSV : MakeCSV (
213- WithInstallModeSupportFor (v1alpha1 .InstallModeTypeAllNamespaces ),
214- WithWebhookDefinitions (v1alpha1.WebhookDescription {}),
215- ),
213+ CSV : clusterserviceversion .Builder ().
214+ WithInstallModeSupportFor (v1alpha1 .InstallModeTypeAllNamespaces ).
215+ WithWebhookDefinitions (v1alpha1.WebhookDescription {}).Build (),
216216 },
217217 )
218218
@@ -245,7 +245,7 @@ func Test_RegistryV1HelmChartProvider_Get_BundleRendererIntegration(t *testing.T
245245
246246 b := source .FromBundle (
247247 bundle.RegistryV1 {
248- CSV : MakeCSV ( WithInstallModeSupportFor (v1alpha1 .InstallModeTypeAllNamespaces , v1alpha1 .InstallModeTypeSingleNamespace )),
248+ CSV : clusterserviceversion . Builder (). WithInstallModeSupportFor (v1alpha1 .InstallModeTypeAllNamespaces , v1alpha1 .InstallModeTypeSingleNamespace ). Build ( ),
249249 },
250250 )
251251
@@ -315,10 +315,9 @@ func Test_RegistryV1HelmChartProvider_Get_Success(t *testing.T) {
315315
316316 b := source .FromBundle (
317317 bundle.RegistryV1 {
318- CSV : MakeCSV (
319- WithAnnotations (map [string ]string {"foo" : "bar" }),
320- WithInstallModeSupportFor (v1alpha1 .InstallModeTypeAllNamespaces ),
321- ),
318+ CSV : clusterserviceversion .Builder ().
319+ WithAnnotations (map [string ]string {"foo" : "bar" }).
320+ WithInstallModeSupportFor (v1alpha1 .InstallModeTypeAllNamespaces ).Build (),
322321 Others : []unstructured.Unstructured {
323322 * ToUnstructuredT (t , & corev1.Service {
324323 TypeMeta : metav1.TypeMeta {
0 commit comments