@@ -936,8 +936,6 @@ var _ = Describe("Install Plan", func() {
936
936
mainPackageDelta := fmt .Sprintf ("%s-delta" , mainPackageName )
937
937
938
938
stableChannel := "stable"
939
- betaChannel := "beta"
940
- deltaChannel := "delta"
941
939
942
940
// Create manifests
943
941
mainManifests := []registry.PackageManifest {
@@ -1000,30 +998,17 @@ var _ = Describe("Install Plan", func() {
1000
998
{
1001
999
PackageName : mainPackageName ,
1002
1000
Channels : []registry.PackageChannel {
1003
- {Name : stableChannel , CurrentCSVName : mainPackageStable },
1004
- {Name : betaChannel , CurrentCSVName : mainPackageBeta },
1001
+ {Name : stableChannel , CurrentCSVName : mainPackageBeta },
1005
1002
},
1006
- DefaultChannelName : betaChannel ,
1003
+ DefaultChannelName : stableChannel ,
1007
1004
},
1008
1005
}
1009
1006
1010
1007
updateInternalCatalog (GinkgoT (), c , crc , mainCatalogSourceName , testNamespace , []apiextensions.CustomResourceDefinition {* tt .intermediateCRD }, []operatorsv1alpha1.ClusterServiceVersion {mainStableCSV , mainBetaCSV }, mainManifests )
1011
-
1012
1008
// Attempt to get the catalog source before creating install plan(s)
1013
1009
_ , err = fetchCatalogSourceOnStatus (crc , mainCatalogSourceName , testNamespace , catalogSourceRegistryPodSynced )
1014
1010
require .NoError (GinkgoT (), err )
1015
-
1016
- // Update the subscription resource to point to the beta CSV
1017
- err = crc .OperatorsV1alpha1 ().Subscriptions (testNamespace ).DeleteCollection (context .TODO (), * metav1 .NewDeleteOptions (0 ), metav1.ListOptions {})
1018
- require .NoError (GinkgoT (), err )
1019
-
1020
- // Delete orphaned csv
1021
- require .NoError (GinkgoT (), crc .OperatorsV1alpha1 ().ClusterServiceVersions (testNamespace ).Delete (context .TODO (), mainStableCSV .GetName (), metav1.DeleteOptions {}))
1022
-
1023
- // existing cleanup should remove this
1024
- createSubscriptionForCatalog (crc , testNamespace , subscriptionName , mainCatalogSourceName , mainPackageName , betaChannel , "" , operatorsv1alpha1 .ApprovalAutomatic )
1025
-
1026
- subscription , err = fetchSubscription (crc , testNamespace , subscriptionName , subscriptionHasInstallPlanChecker )
1011
+ subscription , err = fetchSubscription (crc , testNamespace , subscriptionName , subscriptionHasInstallPlanDifferentChecker (installPlanName ))
1027
1012
require .NoError (GinkgoT (), err )
1028
1013
require .NotNil (GinkgoT (), subscription )
1029
1014
@@ -1049,35 +1034,21 @@ var _ = Describe("Install Plan", func() {
1049
1034
validateCRDVersions (GinkgoT (), c , tt .oldCRD .GetName (), expectedVersions )
1050
1035
1051
1036
// Update the manifest
1052
- mainBetaCSV = newCSV (mainPackageBeta , testNamespace , "" , semver .MustParse ("0.2.0" ), []apiextensions.CustomResourceDefinition {* tt .intermediateCRD }, nil , mainNamedStrategy )
1053
1037
mainManifests = []registry.PackageManifest {
1054
1038
{
1055
1039
PackageName : mainPackageName ,
1056
1040
Channels : []registry.PackageChannel {
1057
- {Name : betaChannel , CurrentCSVName : mainPackageBeta },
1058
- {Name : deltaChannel , CurrentCSVName : mainPackageDelta },
1041
+ {Name : stableChannel , CurrentCSVName : mainPackageDelta },
1059
1042
},
1060
- DefaultChannelName : deltaChannel ,
1043
+ DefaultChannelName : stableChannel ,
1061
1044
},
1062
1045
}
1063
1046
1064
- updateInternalCatalog (GinkgoT (), c , crc , mainCatalogSourceName , testNamespace , []apiextensions.CustomResourceDefinition {* tt .newCRD }, []operatorsv1alpha1.ClusterServiceVersion {mainBetaCSV , mainDeltaCSV }, mainManifests )
1065
-
1047
+ updateInternalCatalog (GinkgoT (), c , crc , mainCatalogSourceName , testNamespace , []apiextensions.CustomResourceDefinition {* tt .newCRD }, []operatorsv1alpha1.ClusterServiceVersion {mainStableCSV , mainBetaCSV , mainDeltaCSV }, mainManifests )
1066
1048
// Attempt to get the catalog source before creating install plan(s)
1067
1049
_ , err = fetchCatalogSourceOnStatus (crc , mainCatalogSourceName , testNamespace , catalogSourceRegistryPodSynced )
1068
1050
require .NoError (GinkgoT (), err )
1069
-
1070
- // Update the subscription resource to point to the beta CSV
1071
- err = crc .OperatorsV1alpha1 ().Subscriptions (testNamespace ).DeleteCollection (context .TODO (), * metav1 .NewDeleteOptions (0 ), metav1.ListOptions {})
1072
- require .NoError (GinkgoT (), err )
1073
-
1074
- // Delete orphaned csv
1075
- require .NoError (GinkgoT (), crc .OperatorsV1alpha1 ().ClusterServiceVersions (testNamespace ).Delete (context .TODO (), mainBetaCSV .GetName (), metav1.DeleteOptions {}))
1076
-
1077
- // existing cleanup should remove this
1078
- createSubscriptionForCatalog (crc , testNamespace , subscriptionName , mainCatalogSourceName , mainPackageName , deltaChannel , "" , operatorsv1alpha1 .ApprovalAutomatic )
1079
-
1080
- subscription , err = fetchSubscription (crc , testNamespace , subscriptionName , subscriptionHasInstallPlanChecker )
1051
+ subscription , err = fetchSubscription (crc , testNamespace , subscriptionName , subscriptionHasInstallPlanDifferentChecker (installPlanName ))
1081
1052
require .NoError (GinkgoT (), err )
1082
1053
require .NotNil (GinkgoT (), subscription )
1083
1054
0 commit comments