@@ -83,7 +83,7 @@ var _ = Describe("Operator Controller Test", func() {
8383 By ("running reconcile" )
8484 res , err := reconciler .Reconcile (ctx , ctrl.Request {NamespacedName : opKey })
8585 Expect (res ).To (Equal (ctrl.Result {}))
86- Expect (err ).To (MatchError (fmt .Sprintf ("no package '%s' found" , pkgName )))
86+ Expect (err ).To (MatchError (fmt .Sprintf ("no package %q found" , pkgName )))
8787
8888 By ("fetching updated operator after reconcile" )
8989 Expect (cl .Get (ctx , opKey , operator )).NotTo (HaveOccurred ())
@@ -97,7 +97,7 @@ var _ = Describe("Operator Controller Test", func() {
9797 Expect (cond ).NotTo (BeNil ())
9898 Expect (cond .Status ).To (Equal (metav1 .ConditionFalse ))
9999 Expect (cond .Reason ).To (Equal (operatorsv1alpha1 .ReasonResolutionFailed ))
100- Expect (cond .Message ).To (Equal (fmt .Sprintf ("no package '%s' found" , pkgName )))
100+ Expect (cond .Message ).To (Equal (fmt .Sprintf ("no package %q found" , pkgName )))
101101 })
102102 })
103103 When ("the operator specifies a version that does not exist" , func () {
@@ -119,7 +119,7 @@ var _ = Describe("Operator Controller Test", func() {
119119 By ("running reconcile" )
120120 res , err := reconciler .Reconcile (ctx , ctrl.Request {NamespacedName : opKey })
121121 Expect (res ).To (Equal (ctrl.Result {}))
122- Expect (err ).To (MatchError (fmt .Sprintf (" no package '%s' matching version ' 0.50.0' found" , pkgName )))
122+ Expect (err ).To (MatchError (fmt .Sprintf (` no package %q matching version " 0.50.0" found` , pkgName )))
123123
124124 By ("fetching updated operator after reconcile" )
125125 Expect (cl .Get (ctx , opKey , operator )).NotTo (HaveOccurred ())
@@ -133,7 +133,7 @@ var _ = Describe("Operator Controller Test", func() {
133133 Expect (cond ).NotTo (BeNil ())
134134 Expect (cond .Status ).To (Equal (metav1 .ConditionFalse ))
135135 Expect (cond .Reason ).To (Equal (operatorsv1alpha1 .ReasonResolutionFailed ))
136- Expect (cond .Message ).To (Equal (fmt .Sprintf (" no package '%s' matching version ' 0.50.0' found" , pkgName )))
136+ Expect (cond .Message ).To (Equal (fmt .Sprintf (` no package %q matching version " 0.50.0" found` , pkgName )))
137137 cond = apimeta .FindStatusCondition (operator .Status .Conditions , operatorsv1alpha1 .TypeInstalled )
138138 Expect (cond ).NotTo (BeNil ())
139139 Expect (cond .Status ).To (Equal (metav1 .ConditionUnknown ))
@@ -765,7 +765,7 @@ var _ = Describe("Operator Controller Test", func() {
765765 By ("running reconcile" )
766766 res , err := reconciler .Reconcile (ctx , ctrl.Request {NamespacedName : opKey })
767767 Expect (res ).To (Equal (ctrl.Result {}))
768- Expect (err ).To (MatchError (fmt .Sprintf ("no package '%s' matching version '%s' found in channel '%s' " , pkgName , pkgVer , pkgChan )))
768+ Expect (err ).To (MatchError (fmt .Sprintf ("no package %q matching version %q found in channel %q " , pkgName , pkgVer , pkgChan )))
769769
770770 By ("fetching updated operator after reconcile" )
771771 Expect (cl .Get (ctx , opKey , operator )).NotTo (HaveOccurred ())
@@ -779,7 +779,7 @@ var _ = Describe("Operator Controller Test", func() {
779779 Expect (cond ).NotTo (BeNil ())
780780 Expect (cond .Status ).To (Equal (metav1 .ConditionFalse ))
781781 Expect (cond .Reason ).To (Equal (operatorsv1alpha1 .ReasonResolutionFailed ))
782- Expect (cond .Message ).To (Equal (fmt .Sprintf ("no package '%s' matching version '%s' found in channel '%s' " , pkgName , pkgVer , pkgChan )))
782+ Expect (cond .Message ).To (Equal (fmt .Sprintf ("no package %q matching version %q found in channel %q " , pkgName , pkgVer , pkgChan )))
783783 cond = apimeta .FindStatusCondition (operator .Status .Conditions , operatorsv1alpha1 .TypeInstalled )
784784 Expect (cond ).NotTo (BeNil ())
785785 Expect (cond .Status ).To (Equal (metav1 .ConditionUnknown ))
@@ -808,7 +808,7 @@ var _ = Describe("Operator Controller Test", func() {
808808 By ("running reconcile" )
809809 res , err := reconciler .Reconcile (ctx , ctrl.Request {NamespacedName : opKey })
810810 Expect (res ).To (Equal (ctrl.Result {}))
811- Expect (err ).To (MatchError (fmt .Sprintf ("no package '%s' found in channel '%s' " , pkgName , pkgChan )))
811+ Expect (err ).To (MatchError (fmt .Sprintf ("no package %q found in channel %q " , pkgName , pkgChan )))
812812
813813 By ("fetching updated operator after reconcile" )
814814 Expect (cl .Get (ctx , opKey , operator )).NotTo (HaveOccurred ())
@@ -822,7 +822,7 @@ var _ = Describe("Operator Controller Test", func() {
822822 Expect (cond ).NotTo (BeNil ())
823823 Expect (cond .Status ).To (Equal (metav1 .ConditionFalse ))
824824 Expect (cond .Reason ).To (Equal (operatorsv1alpha1 .ReasonResolutionFailed ))
825- Expect (cond .Message ).To (Equal (fmt .Sprintf ("no package '%s' found in channel '%s' " , pkgName , pkgChan )))
825+ Expect (cond .Message ).To (Equal (fmt .Sprintf ("no package %q found in channel %q " , pkgName , pkgChan )))
826826 cond = apimeta .FindStatusCondition (operator .Status .Conditions , operatorsv1alpha1 .TypeInstalled )
827827 Expect (cond ).NotTo (BeNil ())
828828 Expect (cond .Status ).To (Equal (metav1 .ConditionUnknown ))
@@ -854,7 +854,7 @@ var _ = Describe("Operator Controller Test", func() {
854854 By ("running reconcile" )
855855 res , err := reconciler .Reconcile (ctx , ctrl.Request {NamespacedName : opKey })
856856 Expect (res ).To (Equal (ctrl.Result {}))
857- Expect (err ).To (MatchError (fmt .Sprintf ("no package '%s' matching version '%s' found in channel '%s' " , pkgName , pkgVer , pkgChan )))
857+ Expect (err ).To (MatchError (fmt .Sprintf ("no package %q matching version %q found in channel %q " , pkgName , pkgVer , pkgChan )))
858858
859859 By ("fetching updated operator after reconcile" )
860860 Expect (cl .Get (ctx , opKey , operator )).NotTo (HaveOccurred ())
@@ -868,7 +868,7 @@ var _ = Describe("Operator Controller Test", func() {
868868 Expect (cond ).NotTo (BeNil ())
869869 Expect (cond .Status ).To (Equal (metav1 .ConditionFalse ))
870870 Expect (cond .Reason ).To (Equal (operatorsv1alpha1 .ReasonResolutionFailed ))
871- Expect (cond .Message ).To (Equal (fmt .Sprintf ("no package '%s' matching version '%s' found in channel '%s' " , pkgName , pkgVer , pkgChan )))
871+ Expect (cond .Message ).To (Equal (fmt .Sprintf ("no package %q matching version %q found in channel %q " , pkgName , pkgVer , pkgChan )))
872872 cond = apimeta .FindStatusCondition (operator .Status .Conditions , operatorsv1alpha1 .TypeInstalled )
873873 Expect (cond ).NotTo (BeNil ())
874874 Expect (cond .Status ).To (Equal (metav1 .ConditionUnknown ))
0 commit comments