@@ -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
@@ -92,7 +93,7 @@ func Test_RegistryV1HelmChartProvider_Get_NoWebhooksWithoutCertProvider(t *testi
9293
9394 b := source .FromBundle (
9495 bundle.RegistryV1 {
95- CSV : MakeCSV ( WithWebhookDefinitions (v1alpha1.WebhookDescription {})),
96+ CSV : clusterserviceversion . Builder (). WithWebhookDefinitions (v1alpha1.WebhookDescription {}). Build ( ),
9697 },
9798 )
9899
@@ -114,7 +115,7 @@ func Test_RegistryV1HelmChartProvider_Get_WebhooksSupportDisabled(t *testing.T)
114115
115116 b := source .FromBundle (
116117 bundle.RegistryV1 {
117- CSV : MakeCSV ( WithWebhookDefinitions (v1alpha1.WebhookDescription {})),
118+ CSV : clusterserviceversion . Builder (). WithWebhookDefinitions (v1alpha1.WebhookDescription {}). Build ( ),
118119 },
119120 )
120121
@@ -137,10 +138,9 @@ func Test_RegistryV1HelmChartProvider_Get_WebhooksWithCertProvider(t *testing.T)
137138
138139 b := source .FromBundle (
139140 bundle.RegistryV1 {
140- CSV : MakeCSV (
141- WithInstallModeSupportFor (v1alpha1 .InstallModeTypeAllNamespaces ),
142- WithWebhookDefinitions (v1alpha1.WebhookDescription {}),
143- ),
141+ CSV : clusterserviceversion .Builder ().
142+ WithInstallModeSupportFor (v1alpha1 .InstallModeTypeAllNamespaces ).
143+ WithWebhookDefinitions (v1alpha1.WebhookDescription {}).Build (),
144144 },
145145 )
146146
@@ -173,7 +173,7 @@ func Test_RegistryV1HelmChartProvider_Get_BundleRendererIntegration(t *testing.T
173173
174174 b := source .FromBundle (
175175 bundle.RegistryV1 {
176- CSV : MakeCSV ( WithInstallModeSupportFor (v1alpha1 .InstallModeTypeAllNamespaces , v1alpha1 .InstallModeTypeSingleNamespace )),
176+ CSV : clusterserviceversion . Builder (). WithInstallModeSupportFor (v1alpha1 .InstallModeTypeAllNamespaces , v1alpha1 .InstallModeTypeSingleNamespace ). Build ( ),
177177 },
178178 )
179179
@@ -243,10 +243,9 @@ func Test_RegistryV1HelmChartProvider_Get_Success(t *testing.T) {
243243
244244 b := source .FromBundle (
245245 bundle.RegistryV1 {
246- CSV : MakeCSV (
247- WithAnnotations (map [string ]string {"foo" : "bar" }),
248- WithInstallModeSupportFor (v1alpha1 .InstallModeTypeAllNamespaces ),
249- ),
246+ CSV : clusterserviceversion .Builder ().
247+ WithAnnotations (map [string ]string {"foo" : "bar" }).
248+ WithInstallModeSupportFor (v1alpha1 .InstallModeTypeAllNamespaces ).Build (),
250249 Others : []unstructured.Unstructured {
251250 * ToUnstructuredT (t , & corev1.Service {
252251 TypeMeta : metav1.TypeMeta {
0 commit comments