@@ -1571,6 +1571,75 @@ func TestCheckInstallPlanStatus(t *testing.T) {
1571
1571
}),
1572
1572
},
1573
1573
},
1574
+ {
1575
+ description : "InstallPlanReferencedState/NoConditions/Failed/ToInstallPlanFailedState/Update/InstallPlanReasonComponentFailed/MultipleBundleConditions" ,
1576
+ fields : fields {
1577
+ existingObjs : existingObjs {
1578
+ clientObjs : []runtime.Object {
1579
+ & v1alpha1.Subscription {
1580
+ ObjectMeta : metav1.ObjectMeta {
1581
+ Name : "sub" ,
1582
+ Namespace : "ns" ,
1583
+ },
1584
+ },
1585
+ },
1586
+ },
1587
+ namespace : "ns" ,
1588
+ state : newInstallPlanReferencedState (& v1alpha1.Subscription {
1589
+ ObjectMeta : metav1.ObjectMeta {
1590
+ Name : "sub" ,
1591
+ Namespace : "ns" ,
1592
+ },
1593
+ }),
1594
+ },
1595
+ args : args {
1596
+ now : & now ,
1597
+ status : & v1alpha1.InstallPlanStatus {
1598
+ Phase : v1alpha1 .InstallPlanPhaseFailed ,
1599
+ Conditions : []v1alpha1.InstallPlanCondition {
1600
+ {
1601
+ Type : v1alpha1 .InstallPlanInstalled ,
1602
+ Status : corev1 .ConditionFalse ,
1603
+ Reason : v1alpha1 .InstallPlanReasonComponentFailed ,
1604
+ },
1605
+ },
1606
+ BundleLookups : []v1alpha1.BundleLookup {
1607
+ {
1608
+ Conditions : []v1alpha1.BundleLookupCondition {
1609
+ {
1610
+ Type : v1alpha1 .BundleLookupPending ,
1611
+ Status : corev1 .ConditionTrue ,
1612
+ Message : "encountered issue foo" ,
1613
+ },
1614
+ },
1615
+ },
1616
+ {
1617
+ Conditions : []v1alpha1.BundleLookupCondition {
1618
+ {
1619
+ Type : v1alpha1 .BundleLookupPending ,
1620
+ Status : corev1 .ConditionTrue ,
1621
+ Message : "encountered issue bar" ,
1622
+ },
1623
+ },
1624
+ },
1625
+ },
1626
+ },
1627
+ },
1628
+ want : want {
1629
+ transitioned : newInstallPlanFailedState (& v1alpha1.Subscription {
1630
+ ObjectMeta : metav1.ObjectMeta {
1631
+ Name : "sub" ,
1632
+ Namespace : "ns" ,
1633
+ },
1634
+ Status : v1alpha1.SubscriptionStatus {
1635
+ Conditions : []v1alpha1.SubscriptionCondition {
1636
+ planFailedCondition (corev1 .ConditionTrue , string (v1alpha1 .InstallPlanReasonComponentFailed ), "encountered issue foo. encountered issue bar." , & now ),
1637
+ },
1638
+ LastUpdated : now ,
1639
+ },
1640
+ }),
1641
+ },
1642
+ },
1574
1643
{
1575
1644
description : "InstallPlanReferencedState/Conditions/Failed/ToInstallPlanFailedState/NoUpdate/InstallPlanReasonComponentFailed" ,
1576
1645
fields : fields {
0 commit comments