@@ -1461,53 +1461,57 @@ var _ = Describe("Subscription", func() {
1461
1461
By (`csvs for catalogsource 2` )
1462
1462
csvs2 := make ([]operatorsv1alpha1.ClusterServiceVersion , 0 )
1463
1463
1464
- packageA := registry.PackageManifest {PackageName : "PackageA " }
1464
+ testPackage := registry.PackageManifest {PackageName : "test-package " }
1465
1465
By ("Package A" , func () {
1466
1466
Step (1 , "Default Channel: Stable" , func () {
1467
- packageA .DefaultChannelName = stableChannel
1467
+ testPackage .DefaultChannelName = stableChannel
1468
1468
})
1469
1469
1470
1470
Step (1 , "Channel Stable" , func () {
1471
1471
Step (2 , "Operator A (Requires CRD, CRD 2)" , func () {
1472
1472
csvA := newCSV ("csv-a" , generatedNamespace .GetName (), "" , semver .MustParse ("0.1.0" ), nil , []apiextensionsv1.CustomResourceDefinition {crd , crd2 }, nil )
1473
- packageA .Channels = append (packageA .Channels , registry.PackageChannel {Name : stableChannel , CurrentCSVName : csvA .GetName ()})
1473
+ testPackage .
1474
+ Channels = append (testPackage .
1475
+ Channels , registry.PackageChannel {Name : stableChannel , CurrentCSVName : csvA .GetName ()})
1474
1476
csvs1 = append (csvs1 , csvA )
1475
1477
})
1476
1478
})
1477
1479
1478
1480
Step (1 , "Channel Alpha" , func () {
1479
1481
Step (2 , "Operator ABC (Provides: CRD, CRD 2)" , func () {
1480
1482
csvABC := newCSV ("csv-abc" , generatedNamespace .GetName (), "" , semver .MustParse ("0.1.0" ), []apiextensionsv1.CustomResourceDefinition {crd , crd2 }, nil , nil )
1481
- packageA .Channels = append (packageA .Channels , registry.PackageChannel {Name : alphaChannel , CurrentCSVName : csvABC .GetName ()})
1483
+ testPackage .
1484
+ Channels = append (testPackage .
1485
+ Channels , registry.PackageChannel {Name : alphaChannel , CurrentCSVName : csvABC .GetName ()})
1482
1486
csvs1 = append (csvs1 , csvABC )
1483
1487
})
1484
1488
})
1485
1489
})
1486
1490
1487
- packageB := registry.PackageManifest {PackageName : "PackageB " }
1491
+ anotherPackage := registry.PackageManifest {PackageName : "another-package " }
1488
1492
By ("Package B" , func () {
1489
1493
Step (1 , "Default Channel: Stable" , func () {
1490
- packageB .DefaultChannelName = stableChannel
1494
+ anotherPackage .DefaultChannelName = stableChannel
1491
1495
})
1492
1496
1493
1497
Step (1 , "Channel Stable" , func () {
1494
1498
Step (2 , "Operator B (Provides: CRD)" , func () {
1495
1499
csvB := newCSV ("csv-b" , generatedNamespace .GetName (), "" , semver .MustParse ("0.1.0" ), []apiextensionsv1.CustomResourceDefinition {crd }, nil , nil )
1496
- packageB .Channels = append (packageB .Channels , registry.PackageChannel {Name : stableChannel , CurrentCSVName : csvB .GetName ()})
1500
+ anotherPackage .Channels = append (anotherPackage .Channels , registry.PackageChannel {Name : stableChannel , CurrentCSVName : csvB .GetName ()})
1497
1501
csvs1 = append (csvs1 , csvB )
1498
1502
})
1499
1503
})
1500
1504
1501
1505
Step (1 , "Channel Alpha" , func () {
1502
1506
Step (2 , "Operator D (Provides: CRD)" , func () {
1503
1507
csvD := newCSV ("csv-d" , generatedNamespace .GetName (), "" , semver .MustParse ("0.1.0" ), []apiextensionsv1.CustomResourceDefinition {crd }, nil , nil )
1504
- packageB .Channels = append (packageB .Channels , registry.PackageChannel {Name : alphaChannel , CurrentCSVName : csvD .GetName ()})
1508
+ anotherPackage .Channels = append (anotherPackage .Channels , registry.PackageChannel {Name : alphaChannel , CurrentCSVName : csvD .GetName ()})
1505
1509
csvs1 = append (csvs1 , csvD )
1506
1510
})
1507
1511
})
1508
1512
})
1509
1513
1510
- packageBInCatsrc2 := registry.PackageManifest {PackageName : "PackageB " }
1514
+ packageBInCatsrc2 := registry.PackageManifest {PackageName : "another-package " }
1511
1515
By ("Package B" , func () {
1512
1516
Step (1 , "Default Channel: Stable" , func () {
1513
1517
packageBInCatsrc2 .DefaultChannelName = stableChannel
@@ -1542,7 +1546,7 @@ var _ = Describe("Subscription", func() {
1542
1546
var cleanup cleanupFunc
1543
1547
By ("creating catalogsources" , func () {
1544
1548
var c1 , c2 cleanupFunc
1545
- catsrc , c1 = createInternalCatalogSource (kubeClient , crClient , genName ("catsrc" ), generatedNamespace .GetName (), []registry.PackageManifest {packageA , packageB }, []apiextensionsv1.CustomResourceDefinition {crd , crd2 }, csvs1 )
1549
+ catsrc , c1 = createInternalCatalogSource (kubeClient , crClient , genName ("catsrc" ), generatedNamespace .GetName (), []registry.PackageManifest {testPackage , anotherPackage }, []apiextensionsv1.CustomResourceDefinition {crd , crd2 }, csvs1 )
1546
1550
catsrc2 , c2 = createInternalCatalogSource (kubeClient , crClient , genName ("catsrc2" ), generatedNamespace .GetName (), []registry.PackageManifest {packageBInCatsrc2 , packageC }, []apiextensionsv1.CustomResourceDefinition {crd , crd2 }, csvs2 )
1547
1551
cleanup = func () {
1548
1552
c1 ()
@@ -1558,11 +1562,11 @@ var _ = Describe("Subscription", func() {
1558
1562
require .NoError (GinkgoT (), err )
1559
1563
})
1560
1564
1561
- By (`Create a subscription for packageA in catsrc` )
1565
+ By (`Create a subscription for test-package in catsrc` )
1562
1566
subscriptionSpec := & operatorsv1alpha1.SubscriptionSpec {
1563
1567
CatalogSource : catsrc .GetName (),
1564
1568
CatalogSourceNamespace : catsrc .GetNamespace (),
1565
- Package : packageA .PackageName ,
1569
+ Package : testPackage .PackageName ,
1566
1570
Channel : stableChannel ,
1567
1571
InstallPlanApproval : operatorsv1alpha1 .ApprovalAutomatic ,
1568
1572
}
@@ -1668,7 +1672,7 @@ var _ = Describe("Subscription", func() {
1668
1672
var subscription * operatorsv1alpha1.Subscription
1669
1673
1670
1674
BeforeEach (func () {
1671
- By (`Create a subscription for packageA in catsrc` )
1675
+ By (`Create a subscription for test-package in catsrc` )
1672
1676
subscriptionSpec := & operatorsv1alpha1.SubscriptionSpec {
1673
1677
CatalogSource : catsrcMain .GetName (),
1674
1678
CatalogSourceNamespace : catsrcMain .GetNamespace (),
@@ -1756,7 +1760,7 @@ var _ = Describe("Subscription", func() {
1756
1760
var subscription * operatorsv1alpha1.Subscription
1757
1761
1758
1762
BeforeEach (func () {
1759
- By (`Create a subscription for packageA in catsrc` )
1763
+ By (`Create a subscription for test-package in catsrc` )
1760
1764
subscriptionSpec := & operatorsv1alpha1.SubscriptionSpec {
1761
1765
CatalogSource : catsrcMain .GetName (),
1762
1766
CatalogSourceNamespace : catsrcMain .GetNamespace (),
@@ -1850,7 +1854,7 @@ var _ = Describe("Subscription", func() {
1850
1854
var subscription * operatorsv1alpha1.Subscription
1851
1855
1852
1856
BeforeEach (func () {
1853
- By (`Create a subscription for packageA in catsrc` )
1857
+ By (`Create a subscription for test-package in catsrc` )
1854
1858
subscriptionSpec := & operatorsv1alpha1.SubscriptionSpec {
1855
1859
CatalogSource : catsrcMain .GetName (),
1856
1860
CatalogSourceNamespace : catsrcMain .GetNamespace (),
@@ -1944,7 +1948,7 @@ var _ = Describe("Subscription", func() {
1944
1948
var subscription * operatorsv1alpha1.Subscription
1945
1949
1946
1950
BeforeEach (func () {
1947
- By (`Create a subscription for packageA in catsrc` )
1951
+ By (`Create a subscription for test-package in catsrc` )
1948
1952
subscriptionSpec := & operatorsv1alpha1.SubscriptionSpec {
1949
1953
CatalogSource : catsrcMain .GetName (),
1950
1954
CatalogSourceNamespace : catsrcMain .GetNamespace (),
@@ -2156,7 +2160,7 @@ var _ = Describe("Subscription", func() {
2156
2160
2157
2161
packages = []registry.PackageManifest {
2158
2162
{
2159
- PackageName : "packageA " ,
2163
+ PackageName : "test-package " ,
2160
2164
Channels : []registry.PackageChannel {
2161
2165
{Name : "alpha" , CurrentCSVName : "csvA" },
2162
2166
},
@@ -2171,7 +2175,7 @@ var _ = Describe("Subscription", func() {
2171
2175
_ , err := fetchCatalogSourceOnStatus (crc , catSrcName , generatedNamespace .GetName (), catalogSourceRegistryPodSynced ())
2172
2176
require .NoError (GinkgoT (), err )
2173
2177
2174
- cleanup = createSubscriptionForCatalog (crc , generatedNamespace .GetName (), subName , catSrcName , "packageA " , "alpha" , "" , operatorsv1alpha1 .ApprovalAutomatic )
2178
+ cleanup = createSubscriptionForCatalog (crc , generatedNamespace .GetName (), subName , catSrcName , "test-package " , "alpha" , "" , operatorsv1alpha1 .ApprovalAutomatic )
2175
2179
})
2176
2180
2177
2181
AfterEach (func () {
@@ -2193,7 +2197,7 @@ var _ = Describe("Subscription", func() {
2193
2197
2194
2198
BeforeEach (func () {
2195
2199
newPkg := registry.PackageManifest {
2196
- PackageName : "PackageB " ,
2200
+ PackageName : "another-package " ,
2197
2201
Channels : []registry.PackageChannel {
2198
2202
{Name : "alpha" , CurrentCSVName : "csvB" },
2199
2203
},
@@ -2422,8 +2426,8 @@ var _ = Describe("Subscription", func() {
2422
2426
Expect (magicCatalog .DeployCatalog (context .Background ())).To (BeNil ())
2423
2427
2424
2428
By ("creating the testing subscription" )
2425
- subName = fmt .Sprintf ("%s-packagea -sub" , generatedNamespace .GetName ())
2426
- createSubscriptionForCatalog (crc , generatedNamespace .GetName (), subName , catalogSourceName , "packageA " , stableChannel , "" , operatorsv1alpha1 .ApprovalAutomatic )
2429
+ subName = fmt .Sprintf ("%s-test-package -sub" , generatedNamespace .GetName ())
2430
+ createSubscriptionForCatalog (crc , generatedNamespace .GetName (), subName , catalogSourceName , "test-package " , stableChannel , "" , operatorsv1alpha1 .ApprovalAutomatic )
2427
2431
2428
2432
By ("waiting until the subscription has an IP reference" )
2429
2433
subscription , err := fetchSubscription (crc , generatedNamespace .GetName (), subName , subscriptionHasInstallPlanChecker ())
@@ -2594,13 +2598,11 @@ var _ = Describe("Subscription", func() {
2594
2598
Expect (err ).To (BeNil ())
2595
2599
2596
2600
By ("waiting for the subscription to have v0.3.0 installed with a Package deprecated condition" )
2597
- _ , err = fetchSubscription (crc , generatedNamespace .GetName (), subName , subscriptionDoesNotHaveCondition (operatorsv1alpha1 .SubscriptionBundleDeprecated ))
2598
- Expect (err ).Should (BeNil ())
2599
2601
sub , err = fetchSubscription (crc , generatedNamespace .GetName (), subName , subscriptionHasCondition (
2600
2602
operatorsv1alpha1 .SubscriptionPackageDeprecated ,
2601
2603
corev1 .ConditionTrue ,
2602
2604
"" ,
2603
- "olm.package/packageA: packageA has been deprecated. Please switch to packageB ." ))
2605
+ "olm.package/test-package: test-package has been deprecated. Please switch to another-package ." ))
2604
2606
Expect (err ).Should (BeNil ())
2605
2607
2606
2608
By ("checking for the deprecated conditions" )
@@ -2827,8 +2829,8 @@ properties:
2827
2829
Expect (magicCatalog .DeployCatalog (context .Background ())).To (BeNil ())
2828
2830
2829
2831
By ("creating the testing subscription" )
2830
- subName := fmt .Sprintf ("%s-packagea -sub" , generatedNamespace .GetName ())
2831
- createSubscriptionForCatalog (crc , generatedNamespace .GetName (), subName , catalogSourceName , "packageA " , stableChannel , "" , operatorsv1alpha1 .ApprovalAutomatic )
2832
+ subName := fmt .Sprintf ("%s-test-package -sub" , generatedNamespace .GetName ())
2833
+ createSubscriptionForCatalog (crc , generatedNamespace .GetName (), subName , catalogSourceName , "test-package " , stableChannel , "" , operatorsv1alpha1 .ApprovalAutomatic )
2832
2834
2833
2835
By ("waiting until the subscription has an IP reference" )
2834
2836
subscription , err := fetchSubscription (crc , generatedNamespace .GetName (), subName , subscriptionHasInstallPlanChecker ())
@@ -3268,6 +3270,7 @@ func fetchSubscription(crc versioned.Interface, namespace, name string, checker
3268
3270
if thisState != lastState || thisCSV != lastCSV || ! equality .Semantic .DeepEqual (thisInstallPlanRef , lastInstallPlanRef ) {
3269
3271
lastState , lastCSV , lastInstallPlanRef = thisState , thisCSV , thisInstallPlanRef
3270
3272
log (fmt .Sprintf ("subscription %s/%s state: %s (csv %s): installPlanRef: %#v" , namespace , name , thisState , thisCSV , thisInstallPlanRef ))
3273
+ log (fmt .Sprintf ("subscription %s/%s state: %s (csv %s): status: %#v" , namespace , name , thisState , thisCSV , fetchedSubscription .Status ))
3271
3274
}
3272
3275
return checker (fetchedSubscription ), nil
3273
3276
})
0 commit comments