@@ -22,8 +22,8 @@ import (
2222 "github.com/operator-framework/operator-controller/internal/operator-controller/rukpak/render"
2323 "github.com/operator-framework/operator-controller/internal/operator-controller/rukpak/render/registryv1"
2424 . "github.com/operator-framework/operator-controller/internal/operator-controller/rukpak/util/testing"
25- "github.com/operator-framework/operator-controller/internal/operator-controller/rukpak/util/ testing/bundlefs "
26- "github.com/operator-framework/operator-controller/internal/operator-controller/rukpak/util/ testing/clusterserviceversion "
25+ bundlecsv "github.com/operator-framework/operator-controller/internal/testing/bundle/csv "
26+ bundlefs "github.com/operator-framework/operator-controller/internal/testing/bundle/fs "
2727)
2828
2929func Test_RegistryV1ManifestProvider_Integration (t * testing.T ) {
@@ -53,7 +53,7 @@ func Test_RegistryV1ManifestProvider_Integration(t *testing.T) {
5353 // The contents of the bundle are not important for this tesy, only that it be a valid bundle
5454 // to avoid errors in the deserialization process
5555 bundleFS := bundlefs .Builder ().WithPackageName ("test" ).
56- WithCSV (clusterserviceversion .Builder ().WithInstallModeSupportFor (v1alpha1 .InstallModeTypeAllNamespaces ).Build ()).Build ()
56+ WithCSV (bundlecsv .Builder ().WithInstallModeSupportFor (v1alpha1 .InstallModeTypeAllNamespaces ).Build ()).Build ()
5757
5858 ext := & ocv1.ClusterExtension {
5959 Spec : ocv1.ClusterExtensionSpec {
@@ -83,7 +83,7 @@ func Test_RegistryV1ManifestProvider_Integration(t *testing.T) {
8383 // The contents of the bundle are not important for this tesy, only that it be a valid bundle
8484 // to avoid errors in the deserialization process
8585 bundleFS := bundlefs .Builder ().WithPackageName ("test" ).
86- WithCSV (clusterserviceversion .Builder ().WithInstallModeSupportFor (v1alpha1 .InstallModeTypeSingleNamespace ).Build ()).Build ()
86+ WithCSV (bundlecsv .Builder ().WithInstallModeSupportFor (v1alpha1 .InstallModeTypeSingleNamespace ).Build ()).Build ()
8787
8888 ext := & ocv1.ClusterExtension {
8989 Spec : ocv1.ClusterExtensionSpec {
@@ -116,7 +116,7 @@ func Test_RegistryV1ManifestProvider_Integration(t *testing.T) {
116116
117117 // Bundle with SingleNamespace install mode requiring watchNamespace config
118118 bundleFS := bundlefs .Builder ().WithPackageName ("test" ).
119- WithCSV (clusterserviceversion .Builder ().WithInstallModeSupportFor (v1alpha1 .InstallModeTypeSingleNamespace ).Build ()).Build ()
119+ WithCSV (bundlecsv .Builder ().WithInstallModeSupportFor (v1alpha1 .InstallModeTypeSingleNamespace ).Build ()).Build ()
120120
121121 // ClusterExtension without required config
122122 ext := & ocv1.ClusterExtension {
@@ -138,7 +138,7 @@ func Test_RegistryV1ManifestProvider_Integration(t *testing.T) {
138138 BundleRenderer : registryv1 .Renderer ,
139139 }
140140 bundleFS := bundlefs .Builder ().WithPackageName ("test" ).
141- WithCSV (clusterserviceversion .Builder ().WithInstallModeSupportFor (v1alpha1 .InstallModeTypeAllNamespaces ).Build ()).
141+ WithCSV (bundlecsv .Builder ().WithInstallModeSupportFor (v1alpha1 .InstallModeTypeAllNamespaces ).Build ()).
142142 WithBundleResource ("service.yaml" , & corev1.Service {
143143 TypeMeta : metav1.TypeMeta {
144144 APIVersion : corev1 .SchemeGroupVersion .String (),
@@ -179,7 +179,7 @@ func Test_RegistryV1ManifestProvider_APIServiceSupport(t *testing.T) {
179179 provider := applier.RegistryV1ManifestProvider {}
180180
181181 bundleFS := bundlefs .Builder ().WithPackageName ("test" ).
182- WithCSV (clusterserviceversion .Builder ().WithOwnedAPIServiceDescriptions (v1alpha1.APIServiceDescription {Name : "test-apiservice" }).Build ()).Build ()
182+ WithCSV (bundlecsv .Builder ().WithOwnedAPIServiceDescriptions (v1alpha1.APIServiceDescription {Name : "test-apiservice" }).Build ()).Build ()
183183
184184 ext := & ocv1.ClusterExtension {
185185 Spec : ocv1.ClusterExtensionSpec {
@@ -200,7 +200,7 @@ func Test_RegistryV1ManifestProvider_WebhookSupport(t *testing.T) {
200200 }
201201
202202 bundleFS := bundlefs .Builder ().WithPackageName ("test" ).
203- WithCSV (clusterserviceversion .Builder ().WithWebhookDefinitions (v1alpha1.WebhookDescription {}).Build ()).Build ()
203+ WithCSV (bundlecsv .Builder ().WithWebhookDefinitions (v1alpha1.WebhookDescription {}).Build ()).Build ()
204204
205205 ext := & ocv1.ClusterExtension {
206206 Spec : ocv1.ClusterExtensionSpec {
@@ -220,7 +220,7 @@ func Test_RegistryV1ManifestProvider_WebhookSupport(t *testing.T) {
220220 }
221221
222222 bundleFS := bundlefs .Builder ().WithPackageName ("test" ).
223- WithCSV (clusterserviceversion .Builder ().WithWebhookDefinitions (v1alpha1.WebhookDescription {}).Build ()).Build ()
223+ WithCSV (bundlecsv .Builder ().WithWebhookDefinitions (v1alpha1.WebhookDescription {}).Build ()).Build ()
224224
225225 ext := & ocv1.ClusterExtension {
226226 Spec : ocv1.ClusterExtensionSpec {
@@ -241,7 +241,7 @@ func Test_RegistryV1ManifestProvider_WebhookSupport(t *testing.T) {
241241
242242 bundleFS := bundlefs .Builder ().WithPackageName ("test" ).
243243 WithCSV (
244- clusterserviceversion .Builder ().
244+ bundlecsv .Builder ().
245245 WithInstallModeSupportFor (v1alpha1 .InstallModeTypeAllNamespaces ).
246246 WithWebhookDefinitions (v1alpha1.WebhookDescription {}).Build ()).
247247 Build ()
@@ -264,7 +264,7 @@ func Test_RegistryV1ManifestProvider_SingleOwnNamespaceSupport(t *testing.T) {
264264 }
265265
266266 bundleFS := bundlefs .Builder ().WithPackageName ("test" ).
267- WithCSV (clusterserviceversion .Builder ().WithInstallModeSupportFor (v1alpha1 .InstallModeTypeSingleNamespace ).Build ()).Build ()
267+ WithCSV (bundlecsv .Builder ().WithInstallModeSupportFor (v1alpha1 .InstallModeTypeSingleNamespace ).Build ()).Build ()
268268
269269 _ , err := provider .Get (bundleFS , & ocv1.ClusterExtension {
270270 Spec : ocv1.ClusterExtensionSpec {
@@ -281,7 +281,7 @@ func Test_RegistryV1ManifestProvider_SingleOwnNamespaceSupport(t *testing.T) {
281281 }
282282
283283 bundleFS := bundlefs .Builder ().WithPackageName ("test" ).
284- WithCSV (clusterserviceversion .Builder ().WithInstallModeSupportFor (v1alpha1 .InstallModeTypeSingleNamespace ).Build ()).Build ()
284+ WithCSV (bundlecsv .Builder ().WithInstallModeSupportFor (v1alpha1 .InstallModeTypeSingleNamespace ).Build ()).Build ()
285285
286286 _ , err := provider .Get (bundleFS , & ocv1.ClusterExtension {
287287 Spec : ocv1.ClusterExtensionSpec {
@@ -303,7 +303,7 @@ func Test_RegistryV1ManifestProvider_SingleOwnNamespaceSupport(t *testing.T) {
303303 IsSingleOwnNamespaceEnabled : false ,
304304 }
305305 bundleFS := bundlefs .Builder ().WithPackageName ("test" ).
306- WithCSV (clusterserviceversion .Builder ().WithInstallModeSupportFor (v1alpha1 .InstallModeTypeOwnNamespace ).Build ()).Build ()
306+ WithCSV (bundlecsv .Builder ().WithInstallModeSupportFor (v1alpha1 .InstallModeTypeOwnNamespace ).Build ()).Build ()
307307 _ , err := provider .Get (bundleFS , & ocv1.ClusterExtension {
308308 Spec : ocv1.ClusterExtensionSpec {
309309 Namespace : "install-namespace" ,
@@ -329,7 +329,7 @@ func Test_RegistryV1ManifestProvider_SingleOwnNamespaceSupport(t *testing.T) {
329329 }
330330
331331 bundleFS := bundlefs .Builder ().WithPackageName ("test" ).
332- WithCSV (clusterserviceversion .Builder ().WithInstallModeSupportFor (v1alpha1 .InstallModeTypeSingleNamespace ).Build ()).Build ()
332+ WithCSV (bundlecsv .Builder ().WithInstallModeSupportFor (v1alpha1 .InstallModeTypeSingleNamespace ).Build ()).Build ()
333333
334334 _ , err := provider .Get (bundleFS , & ocv1.ClusterExtension {
335335 Spec : ocv1.ClusterExtensionSpec {
@@ -351,7 +351,7 @@ func Test_RegistryV1ManifestProvider_SingleOwnNamespaceSupport(t *testing.T) {
351351 }
352352
353353 bundleFS := bundlefs .Builder ().WithPackageName ("test" ).
354- WithCSV (clusterserviceversion .Builder ().WithInstallModeSupportFor (v1alpha1 .InstallModeTypeSingleNamespace ).Build ()).Build ()
354+ WithCSV (bundlecsv .Builder ().WithInstallModeSupportFor (v1alpha1 .InstallModeTypeSingleNamespace ).Build ()).Build ()
355355
356356 _ , err := provider .Get (bundleFS , & ocv1.ClusterExtension {
357357 Spec : ocv1.ClusterExtensionSpec {
@@ -377,7 +377,7 @@ func Test_RegistryV1ManifestProvider_SingleOwnNamespaceSupport(t *testing.T) {
377377 IsSingleOwnNamespaceEnabled : true ,
378378 }
379379 bundleFS := bundlefs .Builder ().WithPackageName ("test" ).
380- WithCSV (clusterserviceversion .Builder ().WithInstallModeSupportFor (v1alpha1 .InstallModeTypeOwnNamespace ).Build ()).Build ()
380+ WithCSV (bundlecsv .Builder ().WithInstallModeSupportFor (v1alpha1 .InstallModeTypeOwnNamespace ).Build ()).Build ()
381381 _ , err := provider .Get (bundleFS , & ocv1.ClusterExtension {
382382 Spec : ocv1.ClusterExtensionSpec {
383383 Namespace : installNamespace ,
@@ -397,7 +397,7 @@ func Test_RegistryV1ManifestProvider_SingleOwnNamespaceSupport(t *testing.T) {
397397 IsSingleOwnNamespaceEnabled : true ,
398398 }
399399 bundleFS := bundlefs .Builder ().WithPackageName ("test" ).
400- WithCSV (clusterserviceversion .Builder ().WithInstallModeSupportFor (v1alpha1 .InstallModeTypeOwnNamespace ).Build ()).Build ()
400+ WithCSV (bundlecsv .Builder ().WithInstallModeSupportFor (v1alpha1 .InstallModeTypeOwnNamespace ).Build ()).Build ()
401401 _ , err := provider .Get (bundleFS , & ocv1.ClusterExtension {
402402 Spec : ocv1.ClusterExtensionSpec {
403403 Namespace : "install-namespace" ,
@@ -412,7 +412,7 @@ func Test_RegistryV1ManifestProvider_SingleOwnNamespaceSupport(t *testing.T) {
412412 IsSingleOwnNamespaceEnabled : true ,
413413 }
414414 bundleFS := bundlefs .Builder ().WithPackageName ("test" ).
415- WithCSV (clusterserviceversion .Builder ().WithInstallModeSupportFor (v1alpha1 .InstallModeTypeOwnNamespace ).Build ()).Build ()
415+ WithCSV (bundlecsv .Builder ().WithInstallModeSupportFor (v1alpha1 .InstallModeTypeOwnNamespace ).Build ()).Build ()
416416 _ , err := provider .Get (bundleFS , & ocv1.ClusterExtension {
417417 Spec : ocv1.ClusterExtensionSpec {
418418 Namespace : "install-namespace" ,
@@ -435,7 +435,7 @@ func Test_RegistryV1ManifestProvider_SingleOwnNamespaceSupport(t *testing.T) {
435435 IsSingleOwnNamespaceEnabled : true ,
436436 }
437437 bundleFS := bundlefs .Builder ().WithPackageName ("test" ).
438- WithCSV (clusterserviceversion .Builder ().WithInstallModeSupportFor (v1alpha1 .InstallModeTypeMultiNamespace ).Build ()).Build ()
438+ WithCSV (bundlecsv .Builder ().WithInstallModeSupportFor (v1alpha1 .InstallModeTypeMultiNamespace ).Build ()).Build ()
439439 _ , err := provider .Get (bundleFS , & ocv1.ClusterExtension {
440440 Spec : ocv1.ClusterExtensionSpec {
441441 Namespace : "install-namespace" ,
@@ -466,7 +466,7 @@ func Test_RegistryV1ManifestProvider_DeploymentConfig(t *testing.T) {
466466 }
467467
468468 bundleFS := bundlefs .Builder ().WithPackageName ("test" ).
469- WithCSV (clusterserviceversion .Builder ().WithInstallModeSupportFor (v1alpha1 .InstallModeTypeAllNamespaces ).Build ()).Build ()
469+ WithCSV (bundlecsv .Builder ().WithInstallModeSupportFor (v1alpha1 .InstallModeTypeAllNamespaces ).Build ()).Build ()
470470
471471 _ , err := provider .Get (bundleFS , & ocv1.ClusterExtension {
472472 Spec : ocv1.ClusterExtensionSpec {
@@ -498,7 +498,7 @@ func Test_RegistryV1ManifestProvider_DeploymentConfig(t *testing.T) {
498498 }
499499
500500 bundleFS := bundlefs .Builder ().WithPackageName ("test" ).
501- WithCSV (clusterserviceversion .Builder ().WithInstallModeSupportFor (v1alpha1 .InstallModeTypeAllNamespaces ).Build ()).Build ()
501+ WithCSV (bundlecsv .Builder ().WithInstallModeSupportFor (v1alpha1 .InstallModeTypeAllNamespaces ).Build ()).Build ()
502502
503503 _ , err := provider .Get (bundleFS , & ocv1.ClusterExtension {
504504 Spec : ocv1.ClusterExtensionSpec {
@@ -531,7 +531,7 @@ func Test_RegistryV1ManifestProvider_DeploymentConfig(t *testing.T) {
531531 }
532532
533533 bundleFS := bundlefs .Builder ().WithPackageName ("test" ).
534- WithCSV (clusterserviceversion .Builder ().WithInstallModeSupportFor (v1alpha1 .InstallModeTypeAllNamespaces ).Build ()).Build ()
534+ WithCSV (bundlecsv .Builder ().WithInstallModeSupportFor (v1alpha1 .InstallModeTypeAllNamespaces ).Build ()).Build ()
535535
536536 _ , err := provider .Get (bundleFS , & ocv1.ClusterExtension {
537537 Spec : ocv1.ClusterExtensionSpec {
@@ -574,7 +574,7 @@ func Test_RegistryV1ManifestProvider_DeploymentConfig(t *testing.T) {
574574 }
575575
576576 bundleFS := bundlefs .Builder ().WithPackageName ("test" ).
577- WithCSV (clusterserviceversion .Builder ().WithInstallModeSupportFor (v1alpha1 .InstallModeTypeSingleNamespace ).Build ()).Build ()
577+ WithCSV (bundlecsv .Builder ().WithInstallModeSupportFor (v1alpha1 .InstallModeTypeSingleNamespace ).Build ()).Build ()
578578
579579 _ , err := provider .Get (bundleFS , & ocv1.ClusterExtension {
580580 Spec : ocv1.ClusterExtensionSpec {
@@ -611,7 +611,7 @@ func Test_RegistryV1ManifestProvider_DeploymentConfig(t *testing.T) {
611611 }
612612
613613 bundleFS := bundlefs .Builder ().WithPackageName ("test" ).
614- WithCSV (clusterserviceversion .Builder ().WithInstallModeSupportFor (v1alpha1 .InstallModeTypeAllNamespaces ).Build ()).Build ()
614+ WithCSV (bundlecsv .Builder ().WithInstallModeSupportFor (v1alpha1 .InstallModeTypeAllNamespaces ).Build ()).Build ()
615615
616616 _ , err := provider .Get (bundleFS , & ocv1.ClusterExtension {
617617 Spec : ocv1.ClusterExtensionSpec {
@@ -641,7 +641,7 @@ func Test_RegistryV1ManifestProvider_DeploymentConfig(t *testing.T) {
641641 }
642642
643643 bundleFS := bundlefs .Builder ().WithPackageName ("test" ).
644- WithCSV (clusterserviceversion .Builder ().WithInstallModeSupportFor (v1alpha1 .InstallModeTypeAllNamespaces ).Build ()).Build ()
644+ WithCSV (bundlecsv .Builder ().WithInstallModeSupportFor (v1alpha1 .InstallModeTypeAllNamespaces ).Build ()).Build ()
645645
646646 // Provide deploymentConfig with invalid structure - env should be array, not string
647647 // Schema validation catches this before conversion
@@ -676,7 +676,7 @@ func Test_RegistryV1ManifestProvider_DeploymentConfig(t *testing.T) {
676676 }
677677
678678 bundleFS := bundlefs .Builder ().WithPackageName ("test" ).
679- WithCSV (clusterserviceversion .Builder ().WithInstallModeSupportFor (v1alpha1 .InstallModeTypeAllNamespaces ).Build ()).Build ()
679+ WithCSV (bundlecsv .Builder ().WithInstallModeSupportFor (v1alpha1 .InstallModeTypeAllNamespaces ).Build ()).Build ()
680680
681681 _ , err := provider .Get (bundleFS , & ocv1.ClusterExtension {
682682 Spec : ocv1.ClusterExtensionSpec {
@@ -708,7 +708,7 @@ func Test_RegistryV1ManifestProvider_DeploymentConfig(t *testing.T) {
708708 }
709709
710710 bundleFS := bundlefs .Builder ().WithPackageName ("test" ).
711- WithCSV (clusterserviceversion .Builder ().WithInstallModeSupportFor (v1alpha1 .InstallModeTypeAllNamespaces ).Build ()).Build ()
711+ WithCSV (bundlecsv .Builder ().WithInstallModeSupportFor (v1alpha1 .InstallModeTypeAllNamespaces ).Build ()).Build ()
712712
713713 _ , err := provider .Get (bundleFS , & ocv1.ClusterExtension {
714714 Spec : ocv1.ClusterExtensionSpec {
@@ -771,7 +771,7 @@ func Test_RegistryV1HelmChartProvider_Chart(t *testing.T) {
771771
772772 bundleFS := bundlefs .Builder ().WithPackageName ("test" ).
773773 WithCSV (
774- clusterserviceversion .Builder ().
774+ bundlecsv .Builder ().
775775 WithAnnotations (map [string ]string {"foo" : "bar" }).
776776 WithInstallModeSupportFor (v1alpha1 .InstallModeTypeAllNamespaces ).
777777 Build ()).
0 commit comments