@@ -934,8 +934,6 @@ var _ = Describe("Install Plan", func() {
934934 mainPackageDelta := fmt .Sprintf ("%s-delta" , mainPackageName )
935935
936936 stableChannel := "stable"
937- betaChannel := "beta"
938- deltaChannel := "delta"
939937
940938 // Create manifests
941939 mainManifests := []registry.PackageManifest {
@@ -998,30 +996,17 @@ var _ = Describe("Install Plan", func() {
998996 {
999997 PackageName : mainPackageName ,
1000998 Channels : []registry.PackageChannel {
1001- {Name : stableChannel , CurrentCSVName : mainPackageStable },
1002- {Name : betaChannel , CurrentCSVName : mainPackageBeta },
999+ {Name : stableChannel , CurrentCSVName : mainPackageBeta },
10031000 },
1004- DefaultChannelName : betaChannel ,
1001+ DefaultChannelName : stableChannel ,
10051002 },
10061003 }
10071004
10081005 updateInternalCatalog (GinkgoT (), c , crc , mainCatalogSourceName , testNamespace , []apiextensions.CustomResourceDefinition {* tt .intermediateCRD }, []operatorsv1alpha1.ClusterServiceVersion {mainStableCSV , mainBetaCSV }, mainManifests )
1009-
10101006 // Attempt to get the catalog source before creating install plan(s)
10111007 _ , err = fetchCatalogSourceOnStatus (crc , mainCatalogSourceName , testNamespace , catalogSourceRegistryPodSynced )
10121008 require .NoError (GinkgoT (), err )
1013-
1014- // Update the subscription resource to point to the beta CSV
1015- err = crc .OperatorsV1alpha1 ().Subscriptions (testNamespace ).DeleteCollection (context .TODO (), * metav1 .NewDeleteOptions (0 ), metav1.ListOptions {})
1016- require .NoError (GinkgoT (), err )
1017-
1018- // Delete orphaned csv
1019- require .NoError (GinkgoT (), crc .OperatorsV1alpha1 ().ClusterServiceVersions (testNamespace ).Delete (context .TODO (), mainStableCSV .GetName (), metav1.DeleteOptions {}))
1020-
1021- // existing cleanup should remove this
1022- createSubscriptionForCatalog (crc , testNamespace , subscriptionName , mainCatalogSourceName , mainPackageName , betaChannel , "" , operatorsv1alpha1 .ApprovalAutomatic )
1023-
1024- subscription , err = fetchSubscription (crc , testNamespace , subscriptionName , subscriptionHasInstallPlanChecker )
1009+ subscription , err = fetchSubscription (crc , testNamespace , subscriptionName , subscriptionHasInstallPlanDifferentChecker (installPlanName ))
10251010 require .NoError (GinkgoT (), err )
10261011 require .NotNil (GinkgoT (), subscription )
10271012
@@ -1047,35 +1032,21 @@ var _ = Describe("Install Plan", func() {
10471032 validateCRDVersions (GinkgoT (), c , tt .oldCRD .GetName (), expectedVersions )
10481033
10491034 // Update the manifest
1050- mainBetaCSV = newCSV (mainPackageBeta , testNamespace , "" , semver .MustParse ("0.2.0" ), []apiextensions.CustomResourceDefinition {* tt .intermediateCRD }, nil , mainNamedStrategy )
10511035 mainManifests = []registry.PackageManifest {
10521036 {
10531037 PackageName : mainPackageName ,
10541038 Channels : []registry.PackageChannel {
1055- {Name : betaChannel , CurrentCSVName : mainPackageBeta },
1056- {Name : deltaChannel , CurrentCSVName : mainPackageDelta },
1039+ {Name : stableChannel , CurrentCSVName : mainPackageDelta },
10571040 },
1058- DefaultChannelName : deltaChannel ,
1041+ DefaultChannelName : stableChannel ,
10591042 },
10601043 }
10611044
1062- updateInternalCatalog (GinkgoT (), c , crc , mainCatalogSourceName , testNamespace , []apiextensions.CustomResourceDefinition {* tt .newCRD }, []operatorsv1alpha1.ClusterServiceVersion {mainBetaCSV , mainDeltaCSV }, mainManifests )
1063-
1045+ updateInternalCatalog (GinkgoT (), c , crc , mainCatalogSourceName , testNamespace , []apiextensions.CustomResourceDefinition {* tt .newCRD }, []operatorsv1alpha1.ClusterServiceVersion {mainStableCSV , mainBetaCSV , mainDeltaCSV }, mainManifests )
10641046 // Attempt to get the catalog source before creating install plan(s)
10651047 _ , err = fetchCatalogSourceOnStatus (crc , mainCatalogSourceName , testNamespace , catalogSourceRegistryPodSynced )
10661048 require .NoError (GinkgoT (), err )
1067-
1068- // Update the subscription resource to point to the beta CSV
1069- err = crc .OperatorsV1alpha1 ().Subscriptions (testNamespace ).DeleteCollection (context .TODO (), * metav1 .NewDeleteOptions (0 ), metav1.ListOptions {})
1070- require .NoError (GinkgoT (), err )
1071-
1072- // Delete orphaned csv
1073- require .NoError (GinkgoT (), crc .OperatorsV1alpha1 ().ClusterServiceVersions (testNamespace ).Delete (context .TODO (), mainBetaCSV .GetName (), metav1.DeleteOptions {}))
1074-
1075- // existing cleanup should remove this
1076- createSubscriptionForCatalog (crc , testNamespace , subscriptionName , mainCatalogSourceName , mainPackageName , deltaChannel , "" , operatorsv1alpha1 .ApprovalAutomatic )
1077-
1078- subscription , err = fetchSubscription (crc , testNamespace , subscriptionName , subscriptionHasInstallPlanChecker )
1049+ subscription , err = fetchSubscription (crc , testNamespace , subscriptionName , subscriptionHasInstallPlanDifferentChecker (installPlanName ))
10791050 require .NoError (GinkgoT (), err )
10801051 require .NotNil (GinkgoT (), subscription )
10811052
0 commit comments