@@ -2673,6 +2673,7 @@ var _ = Describe("Install Plan", func() {
2673
2673
ip := newInstallPlanWithDummySteps (installPlanName , ns .GetName (), operatorsv1alpha1 .InstallPlanPhaseNone )
2674
2674
outIP , err := crc .OperatorsV1alpha1 ().InstallPlans (ns .GetName ()).Create (context .TODO (), ip , metav1.CreateOptions {})
2675
2675
Expect (err ).NotTo (HaveOccurred ())
2676
+ Expect (outIP ).NotTo (BeNil ())
2676
2677
2677
2678
// The status gets ignored on create so we need to update it else the InstallPlan sync ignores
2678
2679
// InstallPlans without any steps or bundle lookups
@@ -2682,6 +2683,7 @@ var _ = Describe("Install Plan", func() {
2682
2683
2683
2684
fetchedInstallPlan , err := fetchInstallPlanWithNamespace (GinkgoT (), crc , installPlanName , ns .GetName (), buildInstallPlanPhaseCheckFunc (operatorsv1alpha1 .InstallPlanPhaseFailed ))
2684
2685
Expect (err ).NotTo (HaveOccurred ())
2686
+ Expect (fetchedInstallPlan ).NotTo (BeNil ())
2685
2687
ctx .Ctx ().Logf (fmt .Sprintf ("Install plan %s fetched with phase %s" , fetchedInstallPlan .GetName (), fetchedInstallPlan .Status .Phase ))
2686
2688
ctx .Ctx ().Logf (fmt .Sprintf ("Install plan %s fetched with conditions %+v" , fetchedInstallPlan .GetName (), fetchedInstallPlan .Status .Conditions ))
2687
2689
})
@@ -2699,7 +2701,8 @@ var _ = Describe("Install Plan", func() {
2699
2701
Expect (err ).NotTo (HaveOccurred ())
2700
2702
deleteOpts := & metav1.DeleteOptions {}
2701
2703
defer func () {
2702
- require .NoError (GinkgoT (), c .KubernetesInterface ().CoreV1 ().Namespaces ().Delete (context .TODO (), ns .GetName (), * deleteOpts ))
2704
+ err = c .KubernetesInterface ().CoreV1 ().Namespaces ().Delete (context .TODO (), ns .GetName (), * deleteOpts )
2705
+ Expect (err ).ToNot (HaveOccurred ())
2703
2706
}()
2704
2707
2705
2708
// Create 2 operatorgroups in the same namespace
@@ -2728,6 +2731,7 @@ var _ = Describe("Install Plan", func() {
2728
2731
ip := newInstallPlanWithDummySteps (installPlanName , ns .GetName (), operatorsv1alpha1 .InstallPlanPhaseNone )
2729
2732
outIP , err := crc .OperatorsV1alpha1 ().InstallPlans (ns .GetName ()).Create (context .TODO (), ip , metav1.CreateOptions {})
2730
2733
Expect (err ).NotTo (HaveOccurred ())
2734
+ Expect (outIP ).NotTo (BeNil ())
2731
2735
2732
2736
// The status gets ignored on create so we need to update it else the InstallPlan sync ignores
2733
2737
// InstallPlans without any steps or bundle lookups
@@ -2736,7 +2740,8 @@ var _ = Describe("Install Plan", func() {
2736
2740
Expect (err ).NotTo (HaveOccurred ())
2737
2741
2738
2742
fetchedInstallPlan , err := fetchInstallPlanWithNamespace (GinkgoT (), crc , installPlanName , ns .GetName (), buildInstallPlanPhaseCheckFunc (operatorsv1alpha1 .InstallPlanPhaseFailed ))
2739
- require .NoError (GinkgoT (), err )
2743
+ Expect (err ).ToNot (HaveOccurred ())
2744
+ Expect (fetchedInstallPlan ).NotTo (BeNil ())
2740
2745
ctx .Ctx ().Logf (fmt .Sprintf ("Install plan %s fetched with status %s" , fetchedInstallPlan .GetName (), fetchedInstallPlan .Status .Phase ))
2741
2746
ctx .Ctx ().Logf (fmt .Sprintf ("Install plan %s fetched with conditions %+v" , fetchedInstallPlan .GetName (), fetchedInstallPlan .Status .Conditions ))
2742
2747
})
@@ -2754,7 +2759,8 @@ var _ = Describe("Install Plan", func() {
2754
2759
Expect (err ).NotTo (HaveOccurred ())
2755
2760
deleteOpts := & metav1.DeleteOptions {}
2756
2761
defer func () {
2757
- require .NoError (GinkgoT (), c .KubernetesInterface ().CoreV1 ().Namespaces ().Delete (context .TODO (), ns .GetName (), * deleteOpts ))
2762
+ err = c .KubernetesInterface ().CoreV1 ().Namespaces ().Delete (context .TODO (), ns .GetName (), * deleteOpts )
2763
+ Expect (err ).ToNot (HaveOccurred ())
2758
2764
}()
2759
2765
2760
2766
// OperatorGroup with serviceaccount specified
@@ -2769,6 +2775,7 @@ var _ = Describe("Install Plan", func() {
2769
2775
}
2770
2776
og , err = crc .OperatorsV1 ().OperatorGroups (ns .GetName ()).Create (context .TODO (), og , metav1.CreateOptions {})
2771
2777
Expect (err ).ToNot (HaveOccurred ())
2778
+ Expect (og ).NotTo (BeNil ())
2772
2779
2773
2780
// Update OperatorGroup status with namespace but no service account reference
2774
2781
now := metav1 .Now ()
@@ -2784,6 +2791,7 @@ var _ = Describe("Install Plan", func() {
2784
2791
ip := newInstallPlanWithDummySteps (installPlanName , ns .GetName (), operatorsv1alpha1 .InstallPlanPhaseNone )
2785
2792
outIP , err := crc .OperatorsV1alpha1 ().InstallPlans (ns .GetName ()).Create (context .TODO (), ip , metav1.CreateOptions {})
2786
2793
Expect (err ).NotTo (HaveOccurred ())
2794
+ Expect (outIP ).NotTo (BeNil ())
2787
2795
2788
2796
// The status gets ignored on create so we need to update it else the InstallPlan sync ignores
2789
2797
// InstallPlans without any steps or bundle lookups
@@ -2793,6 +2801,7 @@ var _ = Describe("Install Plan", func() {
2793
2801
2794
2802
fetchedInstallPlan , err := fetchInstallPlanWithNamespace (GinkgoT (), crc , installPlanName , ns .GetName (), buildInstallPlanPhaseCheckFunc (operatorsv1alpha1 .InstallPlanPhaseFailed ))
2795
2803
Expect (err ).NotTo (HaveOccurred ())
2804
+ Expect (fetchedInstallPlan ).NotTo (BeNil ())
2796
2805
ctx .Ctx ().Logf (fmt .Sprintf ("Install plan %s fetched with status %s" , fetchedInstallPlan .GetName (), fetchedInstallPlan .Status .Phase ))
2797
2806
ctx .Ctx ().Logf (fmt .Sprintf ("Install plan %s fetched with conditions %+v" , fetchedInstallPlan .GetName (), fetchedInstallPlan .Status .Conditions ))
2798
2807
})
0 commit comments