@@ -290,7 +290,7 @@ func TestInstallPlanWithCSVsAcrossMultipleCatalogSources(t *testing.T) {
290
290
require .NoError (t , err )
291
291
require .NotNil (t , subscription )
292
292
293
- installPlanName := subscription .Status .Install .Name
293
+ installPlanName := subscription .Status .InstallPlanRef .Name
294
294
295
295
// Wait for InstallPlan to be status: Complete before checking resource presence
296
296
fetchedInstallPlan , err := fetchInstallPlan (t , crc , installPlanName , buildInstallPlanPhaseCheckFunc (v1alpha1 .InstallPlanPhaseComplete ))
@@ -339,11 +339,12 @@ EXPECTED:
339
339
require .NotNil (t , dependentSubscription .Status .InstallPlanRef )
340
340
require .Equal (t , dependentCSV .GetName (), dependentSubscription .Status .CurrentCSV )
341
341
342
- fetchedCSV , err := awaitCSV (t , crc , testNamespace , dependentCSV .GetName (), csvAnyChecker )
342
+ // Verify CSV is created
343
+ _ , err = awaitCSV (t , crc , testNamespace , dependentCSV .GetName (), csvAnyChecker )
343
344
require .NoError (t , err )
344
345
345
346
// Update dependent subscription in catalog and wait for csv to update
346
- updatedDependentCSV := newCSV (dependentPackageStable + "v2" , testNamespace , dependentPackageStable , semver .MustParse ("0.1.1" ), []apiextensions.CustomResourceDefinition {dependentCRD }, nil , dependentNamedStrategy )
347
+ updatedDependentCSV := newCSV (dependentPackageStable + "- v2" , testNamespace , dependentPackageStable , semver .MustParse ("0.1.1" ), []apiextensions.CustomResourceDefinition {dependentCRD }, nil , dependentNamedStrategy )
347
348
dependentManifests = []registry.PackageManifest {
348
349
{
349
350
PackageName : dependentPackageName ,
@@ -353,15 +354,21 @@ EXPECTED:
353
354
DefaultChannelName : stableChannel ,
354
355
},
355
356
}
357
+
356
358
updateInternalCatalog (t , c , crc , dependentCatalogName , testNamespace , []apiextensions.CustomResourceDefinition {dependentCRD }, []v1alpha1.ClusterServiceVersion {dependentCSV , updatedDependentCSV }, dependentManifests )
357
359
358
- dependentSubscription , err = fetchSubscription (t , crc , testNamespace , strings .Join ([]string {dependentPackageStable , dependentCatalogName , testNamespace }, "-" ), subscriptionHasCurrentCSV (updatedDependentCSV .GetName ()))
360
+ // Wait for subscription to update
361
+ updatedDepSubscription , err := fetchSubscription (t , crc , testNamespace , strings .Join ([]string {dependentPackageStable , dependentCatalogName , testNamespace }, "-" ), subscriptionHasCurrentCSV (updatedDependentCSV .GetName ()))
359
362
require .NoError (t , err )
360
363
361
- fetchedCSV , err = awaitCSV (t , crc , testNamespace , updatedDependentCSV .GetName (), csvAnyChecker )
364
+ // Verify installplan created and installed
365
+ fetchedUpdatedDepInstallPlan , err := fetchInstallPlan (t , crc , updatedDepSubscription .Status .InstallPlanRef .Name , buildInstallPlanPhaseCheckFunc (v1alpha1 .InstallPlanPhaseComplete ))
362
366
require .NoError (t , err )
367
+ log (fmt .Sprintf ("Install plan %s fetched with status %s" , fetchedUpdatedDepInstallPlan .GetName (), fetchedUpdatedDepInstallPlan .Status .Phase ))
368
+ require .NotEqual (t , fetchedInstallPlan .GetName (), fetchedUpdatedDepInstallPlan .GetName ())
363
369
364
- err = crc .OperatorsV1alpha1 ().ClusterServiceVersions (testNamespace ).Delete (fetchedCSV .GetName (), metav1 .NewDeleteOptions (0 ))
370
+ // Wait for csv to update
371
+ _ , err = awaitCSV (t , crc , testNamespace , updatedDependentCSV .GetName (), csvAnyChecker )
365
372
require .NoError (t , err )
366
373
}
367
374
0 commit comments