Skip to content

Commit 0ecbcb1

Browse files
n3wscottpmorie
authored andcommitted
Update logs for Cluster service plans. (#1389)
* Rework the logging for controller_instance. * Updating other usages of ClusterServiceClass. * Fixing up unit tests. * Merge with master. * Recover from a bad merge. * use format. * use format. * Fixing tests. * Fixing unit tests. * Using fmt.Sprintf to foramt the expected messages. * Fixing tests.
1 parent 8b491ef commit 0ecbcb1

File tree

5 files changed

+152
-58
lines changed

5 files changed

+152
-58
lines changed

pkg/controller/controller.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,8 @@ func (c *controller) getClusterServiceClassPlanAndClusterServiceBroker(instance
271271
servicePlan, err := c.servicePlanLister.Get(instance.Spec.ClusterServicePlanRef.Name)
272272
if nil != err {
273273
s := fmt.Sprintf(
274-
"References a non-existent ClusterServicePlan %q on ClusterServiceClass (K8S: %q ExternalName: %q)",
275-
instance.Spec.ExternalClusterServicePlanName, serviceClass.Name, serviceClass.Spec.ExternalName,
274+
"References a non-existent ClusterServicePlan (K8S: %q ExternalName: %q) on ClusterServiceClass (K8S: %q ExternalName: %q)",
275+
instance.Spec.ClusterServicePlanName, instance.Spec.ExternalClusterServicePlanName, serviceClass.Name, serviceClass.Spec.ExternalName,
276276
)
277277
glog.Warningf(
278278
`ServiceInstance "%s/%s": %s`,
@@ -365,8 +365,8 @@ func (c *controller) getClusterServiceClassPlanAndClusterServiceBrokerForService
365365
servicePlan, err := c.servicePlanLister.Get(instance.Spec.ClusterServicePlanRef.Name)
366366
if nil != err {
367367
s := fmt.Sprintf(
368-
"References a non-existent ClusterServicePlan %q on ClusterServiceClass (K8S: %q ExternalName: %q)",
369-
instance.Spec.ExternalClusterServicePlanName, serviceClass.Name, serviceClass.Spec.ExternalName,
368+
"References a non-existent ClusterServicePlan (K8S: %q ExternalName: %q) on ClusterServiceClass (K8S: %q ExternalName: %q)",
369+
instance.Spec.ClusterServicePlanName, instance.Spec.ExternalClusterServicePlanName, serviceClass.Name, serviceClass.Spec.ExternalName,
370370
)
371371
glog.Warningf(
372372
`ServiceBinding "%s/%s": %s`,

pkg/controller/controller_broker.go

+129-46
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ func (c *controller) reconcileClusterServiceBrokerKey(key string) error {
174174
// error is returned to indicate that the binding has not been fully
175175
// processed and should be resubmitted at a later time.
176176
func (c *controller) reconcileClusterServiceBroker(broker *v1beta1.ClusterServiceBroker) error {
177-
glog.V(4).Infof("ClusterServiceBroker %q: processing", broker.Name)
177+
glog.V(4).Infof("%s %q: processing", typeCSB, broker.Name)
178178

179179
// * If the broker's ready condition is true and the RelistBehavior has been
180180
// set to Manual, do not reconcile it.
@@ -187,7 +187,10 @@ func (c *controller) reconcileClusterServiceBroker(broker *v1beta1.ClusterServic
187187
if broker.DeletionTimestamp == nil { // Add or update
188188
authConfig, err := getAuthCredentialsFromClusterServiceBroker(c.kubeClient, broker)
189189
if err != nil {
190-
s := fmt.Sprintf("ClusterServiceBroker %q: Error getting broker auth credentials: %s", broker.Name, err)
190+
s := fmt.Sprintf(
191+
"%s %q: Error getting broker auth credentials: %s",
192+
typeCSB, broker.Name, err,
193+
)
191194
glog.Info(s)
192195
c.recorder.Event(broker, corev1.EventTypeWarning, errorAuthCredentialsReason, s)
193196
if err := c.updateClusterServiceBrokerCondition(broker, v1beta1.ServiceBrokerConditionReady, v1beta1.ConditionFalse, errorFetchingCatalogReason, errorFetchingCatalogMessage+s); err != nil {
@@ -198,7 +201,10 @@ func (c *controller) reconcileClusterServiceBroker(broker *v1beta1.ClusterServic
198201

199202
clientConfig := NewClientConfigurationForBroker(broker, authConfig)
200203

201-
glog.V(4).Infof("ClusterServiceBroker %q: creating client, URL: %v", broker.Name, broker.Spec.URL)
204+
glog.V(4).Infof(
205+
"%s %q: creating client, URL: %v",
206+
typeCSB, broker.Name, broker.Spec.URL,
207+
)
202208
brokerClient, err := c.brokerClientCreateFunc(clientConfig)
203209
if err != nil {
204210
s := fmt.Sprintf("Error creating client for broker %q: %s", broker.Name, err)
@@ -210,13 +216,19 @@ func (c *controller) reconcileClusterServiceBroker(broker *v1beta1.ClusterServic
210216
return err
211217
}
212218

213-
glog.V(4).Infof("ClusterServiceBroker %q: processing adding/update event", broker.Name)
219+
glog.V(4).Infof(
220+
"%s %q: processing adding/update event",
221+
typeCSB, broker.Name,
222+
)
214223

215224
// get the broker's catalog
216225
now := metav1.Now()
217226
brokerCatalog, err := brokerClient.GetCatalog()
218227
if err != nil {
219-
s := fmt.Sprintf("ClusterServiceBroker %q: Error getting broker catalog: %s", broker.Name, err)
228+
s := fmt.Sprintf(
229+
"%s %q: Error getting broker catalog: %s",
230+
typeCSB, broker.Name, err,
231+
)
220232
glog.Warning(s)
221233
c.recorder.Eventf(broker, corev1.EventTypeWarning, errorFetchingCatalogReason, s)
222234
if err := c.updateClusterServiceBrokerCondition(broker, v1beta1.ServiceBrokerConditionReady, v1beta1.ConditionFalse, errorFetchingCatalogReason, errorFetchingCatalogMessage+s); err != nil {
@@ -228,12 +240,18 @@ func (c *controller) reconcileClusterServiceBroker(broker *v1beta1.ClusterServic
228240
toUpdate := clone.(*v1beta1.ClusterServiceBroker)
229241
toUpdate.Status.OperationStartTime = &now
230242
if _, err := c.serviceCatalogClient.ClusterServiceBrokers().UpdateStatus(toUpdate); err != nil {
231-
glog.Errorf("ClusterServiceBroker %q: Error updating operation start time: %v", broker.Name, err)
243+
glog.Errorf(
244+
"%s %q: Error updating operation start time: %v",
245+
typeCSB, broker.Name, err,
246+
)
232247
return err
233248
}
234249
}
235250
} else if !time.Now().Before(broker.Status.OperationStartTime.Time.Add(c.reconciliationRetryDuration)) {
236-
s := fmt.Sprintf("ClusterServiceBroker %q: stopping reconciliation retries because too much time has elapsed", broker.Name)
251+
s := fmt.Sprintf(
252+
"%s %q: stopping reconciliation retries because too much time has elapsed",
253+
typeCSB, broker.Name,
254+
)
237255
glog.Info(s)
238256
c.recorder.Event(broker, corev1.EventTypeWarning, errorReconciliationRetryTimeoutReason, s)
239257
clone, err := api.Scheme.DeepCopy(broker)
@@ -253,7 +271,10 @@ func (c *controller) reconcileClusterServiceBroker(broker *v1beta1.ClusterServic
253271
}
254272
return err
255273
}
256-
glog.V(5).Infof("ClusterServiceBroker %q: successfully fetched %v catalog entries", broker.Name, len(brokerCatalog.Services))
274+
glog.V(5).Infof(
275+
"%s %q: successfully fetched %v catalog entries",
276+
typeCSB, broker.Name, len(brokerCatalog.Services),
277+
)
257278

258279
// set the operation start time if not already set
259280
if broker.Status.OperationStartTime != nil {
@@ -264,13 +285,19 @@ func (c *controller) reconcileClusterServiceBroker(broker *v1beta1.ClusterServic
264285
toUpdate := clone.(*v1beta1.ClusterServiceBroker)
265286
toUpdate.Status.OperationStartTime = nil
266287
if _, err := c.serviceCatalogClient.ClusterServiceBrokers().UpdateStatus(toUpdate); err != nil {
267-
glog.Errorf("ClusterServiceBroker %q: error updating operation start time: %v", broker.Name, err)
288+
glog.Errorf(
289+
"%s %q: error updating operation start time: %v",
290+
typeCSB, broker.Name, err,
291+
)
268292
return err
269293
}
270294
}
271295

272296
// convert the broker's catalog payload into our API objects
273-
glog.V(4).Infof("ClusterServiceBroker %q: converting catalog response into service-catalog API", broker.Name)
297+
glog.V(4).Infof(
298+
"%s %q: converting catalog response into service-catalog API",
299+
typeCSB, broker.Name,
300+
)
274301
payloadServiceClasses, payloadServicePlans, err := convertCatalog(brokerCatalog)
275302
if err != nil {
276303
s := fmt.Sprintf("Error converting catalog payload for broker %q to service-catalog API: %s", broker.Name, err)
@@ -281,7 +308,10 @@ func (c *controller) reconcileClusterServiceBroker(broker *v1beta1.ClusterServic
281308
}
282309
return err
283310
}
284-
glog.V(5).Infof("ClusterServiceBroker %q: successfully converted catalog payload from to service-catalog API", broker.Name)
311+
glog.V(5).Infof(
312+
"%s %q: successfully converted catalog payload from to service-catalog API",
313+
typeCSB, broker.Name,
314+
)
285315

286316
// brokers must return at least one service; enforce this constraint
287317
if len(payloadServiceClasses) == 0 {
@@ -310,22 +340,28 @@ func (c *controller) reconcileClusterServiceBroker(broker *v1beta1.ClusterServic
310340
existingServicePlan, _ := existingServicePlanMap[payloadServicePlan.Name]
311341
delete(existingServicePlanMap, payloadServicePlan.Name)
312342

313-
glog.V(4).Infof("ClusterServiceBroker %q: reconciling ClusterServicePlan (K8S: %q ExternalName: %q)", broker.Name, payloadServicePlan.Name, payloadServicePlan.Spec.ExternalName)
343+
glog.V(4).Infof(
344+
"%s %q: reconciling ClusterServicePlan (K8S: %q ExternalName: %q)",
345+
typeCSB, broker.Name, payloadServicePlan.Name, payloadServicePlan.Spec.ExternalName,
346+
)
314347
if err := c.reconcileClusterServicePlanFromClusterServiceBrokerCatalog(broker, payloadServicePlan, existingServicePlan); err != nil {
315348
s := fmt.Sprintf(
316-
"ClusterServiceBroker %q: Error reconciling ClusterServicePlan (K8S: %q ExternalName: %q): %s",
317-
broker.Name,
318-
payloadServicePlan.Name,
319-
payloadServicePlan.Spec.ExternalName,
320-
err,
349+
"Error reconciling ClusterServicePlan (K8S: %q ExternalName: %q): %s",
350+
payloadServicePlan.Name, payloadServicePlan.Spec.ExternalName, err,
351+
)
352+
glog.Warningf(
353+
"%s %q: %s",
354+
typeCSB, broker.Name, s,
321355
)
322-
glog.Warning(s)
323356
c.recorder.Eventf(broker, corev1.EventTypeWarning, errorSyncingCatalogReason, s)
324357
c.updateClusterServiceBrokerCondition(broker, v1beta1.ServiceBrokerConditionReady, v1beta1.ConditionFalse, errorSyncingCatalogReason,
325358
errorSyncingCatalogMessage+s)
326359
return err
327360
}
328-
glog.V(5).Infof("ClusterServiceBroker %q: Reconciled ClusterServicePlan (K8S: %q ExternalName: %q)", broker.Name, payloadServicePlan.Name, payloadServicePlan.Spec.ExternalName)
361+
glog.V(5).Infof(
362+
"%s %q: Reconciled ClusterServicePlan (K8S: %q ExternalName: %q)",
363+
typeCSB, broker.Name, payloadServicePlan.Name, payloadServicePlan.Spec.ExternalName,
364+
)
329365
}
330366

331367
// handle the servicePlans that were not in the broker's payload;
@@ -335,8 +371,8 @@ func (c *controller) reconcileClusterServiceBroker(broker *v1beta1.ClusterServic
335371
continue
336372
}
337373
glog.V(4).Infof(
338-
"ClusterServiceBroker %q: ClusterServicePlan (K8S: %q ExternalName: %q) has been removed from broker's catalog; marking",
339-
broker.Name, existingServicePlan.Name, existingServicePlan.Spec.ExternalName,
374+
"%s %q: ClusterServicePlan (K8S: %q ExternalName: %q) has been removed from broker's catalog; marking",
375+
typeCSB, broker.Name, existingServicePlan.Name, existingServicePlan.Spec.ExternalName,
340376
)
341377
existingServicePlan.Status.RemovedFromBrokerCatalog = true
342378
_, err := c.serviceCatalogClient.ClusterServicePlans().UpdateStatus(existingServicePlan)
@@ -441,24 +477,31 @@ func (c *controller) reconcileClusterServiceBroker(broker *v1beta1.ClusterServic
441477
// and returned early. If we reach this point, we're dealing with an update
442478
// that's actually a soft delete-- i.e. we have some finalization to do.
443479
if finalizers := sets.NewString(broker.Finalizers...); finalizers.Has(v1beta1.FinalizerServiceCatalog) {
444-
glog.V(4).Infof("ClusterServiceBroker %q: finalizing", broker.Name)
480+
glog.V(4).Infof(
481+
"%s %q: finalizing",
482+
typeCSB, broker.Name,
483+
)
445484

446485
existingServiceClasses, existingServicePlans, err := c.getCurrentServiceClassesAndPlansForBroker(broker)
447486
if err != nil {
448487
return err
449488
}
450489

451-
glog.V(4).Infof("ClusterServiceBroker %q: found %d ClusterServiceClasses to delete", broker.Name, len(existingServiceClasses))
452-
glog.V(4).Infof("ClusterServiceBroker %q: found %d ClusterServicePlans to delete", broker.Name, len(existingServicePlans))
490+
glog.V(4).Infof(
491+
"%s %q: found %d ClusterServiceClasses and %d ClusterServicePlans to delete",
492+
typeCSB, broker.Name, len(existingServiceClasses), len(existingServicePlans),
493+
)
453494

454495
for _, plan := range existingServicePlans {
455-
glog.V(4).Infof("ClusterServiceBroker %q: deleting ClusterServicePlan (K8S: %q ExternalName: %q)", broker.Name, plan.Name, plan.Spec.ExternalName)
496+
glog.V(4).Infof(
497+
"%s %q: deleting ClusterServicePlan (K8S: %q ExternalName: %q)",
498+
typeCSB, broker.Name, plan.Name, plan.Spec.ExternalName,
499+
)
456500
err := c.serviceCatalogClient.ClusterServicePlans().Delete(plan.Name, &metav1.DeleteOptions{})
457501
if err != nil && !errors.IsNotFound(err) {
458502
s := fmt.Sprintf(
459-
"Error deleting ClusterServicePlan %q: %s",
460-
plan.Name,
461-
err,
503+
"Error deleting ClusterServicePlan (K8S: %q ExternalName: %q): %s",
504+
plan.Name, plan.Spec.ExternalName, err,
462505
)
463506
glog.Warningf(
464507
"%s %q: %s",
@@ -484,8 +527,8 @@ func (c *controller) reconcileClusterServiceBroker(broker *v1beta1.ClusterServic
484527
err = c.serviceCatalogClient.ClusterServiceClasses().Delete(svcClass.Name, &metav1.DeleteOptions{})
485528
if err != nil && !errors.IsNotFound(err) {
486529
s := fmt.Sprintf(
487-
"Error deleting ClusterServiceClass (K8S: %q ExternalName: %q) (ClusterServiceBroker %q): %s",
488-
svcClass.Name, svcClass.Spec.ExternalName, broker.Name, err,
530+
"Error deleting ClusterServiceClass (K8S: %q ExternalName: %q): %s",
531+
svcClass.Name, svcClass.Spec.ExternalName, err,
489532
)
490533
glog.Warningf(
491534
"%s %q: %s",
@@ -519,7 +562,7 @@ func (c *controller) reconcileClusterServiceBroker(broker *v1beta1.ClusterServic
519562
c.updateClusterServiceBrokerFinalizers(broker, finalizers.List())
520563

521564
c.recorder.Eventf(broker, corev1.EventTypeNormal, successClusterServiceBrokerDeletedReason, successClusterServiceBrokerDeletedMessage, broker.Name)
522-
glog.V(5).Infof("ClusterServiceBroker %q: Successfully deleted", broker.Name)
565+
glog.V(5).Infof("%s %q: Successfully deleted", typeCSB, broker.Name)
523566
return nil
524567
}
525568

@@ -630,29 +673,47 @@ func (c *controller) reconcileClusterServicePlanFromClusterServiceBrokerCatalog(
630673
// not already passed one; the following if statement will almost
631674
// certainly evaluate to true.
632675
if otherServicePlan.Spec.ClusterServiceBrokerName != broker.Name {
633-
errMsg := fmt.Sprintf("ClusterServiceBroker %q: ClusterServicePlan %q already exists for Broker %q", broker.Name, servicePlan.Spec.ExternalName, otherServicePlan.Spec.ClusterServiceBrokerName)
634-
glog.Error(errMsg)
676+
errMsg := fmt.Sprintf(
677+
"ClusterServicePlan (K8S: %q ExternalName: %q) already exists for Broker %q",
678+
servicePlan.Name, servicePlan.Spec.ExternalName, otherServicePlan.Spec.ClusterServiceBrokerName,
679+
)
680+
glog.Errorf(
681+
`%s %q: %s`,
682+
typeCSB, broker.Name, errMsg,
683+
)
635684
return fmt.Errorf(errMsg)
636685
}
637686
}
638687

639688
// An error returned from a lister Get call means that the object does
640689
// not exist. Create a new ClusterServicePlan.
641690
if _, err := c.serviceCatalogClient.ClusterServicePlans().Create(servicePlan); err != nil {
642-
glog.Errorf("ClusterServiceBroker %q: Error creating ClusterServicePlan %q: %v", broker.Name, servicePlan.Name, err)
691+
glog.Errorf(
692+
"%s %q: Error creating ClusterServicePlan (K8S: %q, ExternalName: %q): %v",
693+
typeCSB, broker.Name, servicePlan.Name, servicePlan.Spec.ExternalName, err,
694+
)
643695
return err
644696
}
645697

646698
return nil
647699
}
648700

649701
if existingServicePlan.Spec.ExternalID != servicePlan.Spec.ExternalID {
650-
errMsg := fmt.Sprintf("ClusterServiceBroker %q: ClusterServicePlan %q already exists with OSB guid %q, received different guid %q", broker.Name, servicePlan.Name, existingServicePlan.Spec.ExternalID, servicePlan.Spec.ExternalID)
651-
glog.Error(errMsg)
702+
errMsg := fmt.Sprintf(
703+
"ClusterServicePlan (K8S: %q ExternalName: %q) already exists with OSB guid %q, received different guid %q",
704+
servicePlan.Name, servicePlan.Spec.ExternalName, existingServicePlan.Spec.ExternalID, servicePlan.Spec.ExternalID,
705+
)
706+
glog.Error(
707+
"%s %q: %s",
708+
typeCSB, broker.Name, errMsg,
709+
)
652710
return fmt.Errorf(errMsg)
653711
}
654712

655-
glog.V(5).Infof("ClusterServiceBroker %q: Found existing ClusterServicePlan %q; updating", broker.Name, servicePlan.Name)
713+
glog.V(5).Infof(
714+
"%s %q: Found existing ClusterServicePlan (K8S: %q ExternalName: %q); updating",
715+
typeCSB, broker.Name, servicePlan.Name, servicePlan.Spec.ExternalName,
716+
)
656717

657718
// There was an existing service plan -- project the update onto it and
658719
// update it.
@@ -672,7 +733,10 @@ func (c *controller) reconcileClusterServicePlanFromClusterServiceBrokerCatalog(
672733
toUpdate.Spec.ServiceBindingCreateParameterSchema = servicePlan.Spec.ServiceBindingCreateParameterSchema
673734

674735
if _, err := c.serviceCatalogClient.ClusterServicePlans().Update(toUpdate); err != nil {
675-
glog.Errorf("ClusterServiceBroker %q: Error updating ClusterServicePlan %q: %v", broker.Name, servicePlan.Name, err)
736+
glog.Errorf(
737+
"%s %q: Error updating ClusterServicePlan (K8S: %q ExternalName: %q): %v",
738+
typeCSB, broker.Name, servicePlan.Name, servicePlan.Spec.ExternalName, err,
739+
)
676740
return err
677741
}
678742

@@ -697,14 +761,20 @@ func (c *controller) updateClusterServiceBrokerCondition(broker *v1beta1.Cluster
697761
t := time.Now()
698762

699763
if len(broker.Status.Conditions) == 0 {
700-
glog.Infof("ClusterServiceBroker %q: Setting lastTransitionTime for condition %q to %v", broker.Name, conditionType, t)
764+
glog.Infof(
765+
"%s %q: Setting lastTransitionTime for condition %q to %v",
766+
typeCSB, broker.Name, conditionType, t,
767+
)
701768
newCondition.LastTransitionTime = metav1.NewTime(t)
702769
toUpdate.Status.Conditions = []v1beta1.ServiceBrokerCondition{newCondition}
703770
} else {
704771
for i, cond := range broker.Status.Conditions {
705772
if cond.Type == conditionType {
706773
if cond.Status != newCondition.Status {
707-
glog.Infof("ClusterServiceBroker %q: Found status change for condition %q: %q -> %q; setting lastTransitionTime to %v", broker.Name, conditionType, cond.Status, status, t)
774+
glog.Infof(
775+
"%s %q: Found status change for condition %q: %q -> %q; setting lastTransitionTime to %v",
776+
typeCSB, broker.Name, conditionType, cond.Status, status, t,
777+
)
708778
newCondition.LastTransitionTime = metav1.NewTime(t)
709779
} else {
710780
newCondition.LastTransitionTime = cond.LastTransitionTime
@@ -722,12 +792,20 @@ func (c *controller) updateClusterServiceBrokerCondition(broker *v1beta1.Cluster
722792
toUpdate.Status.ReconciledGeneration = toUpdate.Generation
723793
}
724794

725-
glog.V(4).Infof("ClusterServiceBroker %q: Updating ready condition to %v", broker.Name, status)
795+
glog.V(4).Infof("%s %q: Updating ready condition to %v",
796+
typeCSB, broker.Name, status,
797+
)
726798
_, err = c.serviceCatalogClient.ClusterServiceBrokers().UpdateStatus(toUpdate)
727799
if err != nil {
728-
glog.Errorf("ClusterServiceBroker %q: Error updating ready condition: %v", broker.Name, err)
800+
glog.Errorf(
801+
"%s %q: Error updating ready condition: %v",
802+
typeCSB, broker.Name, err,
803+
)
729804
} else {
730-
glog.V(5).Infof("ClusterServiceBroker %q: Updated ready condition to %v", broker.Name, status)
805+
glog.V(5).Infof(
806+
"%s %q: Updated ready condition to %v",
807+
typeCSB, broker.Name, status,
808+
)
731809
}
732810

733811
return err
@@ -743,7 +821,10 @@ func (c *controller) updateClusterServiceBrokerFinalizers(
743821
// now removing the last finalizer).
744822
broker, err := c.serviceCatalogClient.ClusterServiceBrokers().Get(broker.Name, metav1.GetOptions{})
745823
if err != nil {
746-
glog.Errorf("ClusterServiceBroker %q: Error finalizing: %v", broker.Name, err)
824+
glog.Errorf(
825+
"%s %q: Error finalizing: %v",
826+
typeCSB, broker.Name, err,
827+
)
747828
}
748829

749830
clone, err := api.Scheme.DeepCopy(broker)
@@ -754,8 +835,10 @@ func (c *controller) updateClusterServiceBrokerFinalizers(
754835

755836
toUpdate.Finalizers = finalizers
756837

757-
logContext := fmt.Sprintf("ClusterServiceBroker %q: updating finalizers to %v",
758-
broker.Name, finalizers)
838+
logContext := fmt.Sprintf(
839+
"%s %q: updating finalizers to %v",
840+
typeCSB, broker.Name, finalizers,
841+
)
759842

760843
glog.V(4).Infof("Updating %v", logContext)
761844
_, err = c.serviceCatalogClient.ClusterServiceBrokers().UpdateStatus(toUpdate)

pkg/controller/controller_broker_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ func TestReconcileClusterServiceBrokerExistingClusterServiceClassDifferentBroker
395395
events := getRecordedEvents(testController)
396396
assertNumEvents(t, events, 1)
397397

398-
expectedEvent := corev1.EventTypeWarning + " " + errorSyncingCatalogReason + ` ClusterServiceBroker "test-broker": Error reconciling ClusterServicePlan (K8S: "PGUID" ExternalName: "test-plan"): ClusterServiceBroker "test-broker": ClusterServicePlan "test-plan" already exists for Broker "notTheSame"`
398+
expectedEvent := corev1.EventTypeWarning + " " + errorSyncingCatalogReason + ` Error reconciling ClusterServicePlan (K8S: "PGUID" ExternalName: "test-plan"): ClusterServicePlan (K8S: "PGUID" ExternalName: "test-plan") already exists for Broker "notTheSame"`
399399
if e, a := expectedEvent, events[0]; e != a {
400400
t.Fatalf("Received unexpected event; expected\n%v, got\n%v", e, a)
401401
}

0 commit comments

Comments
 (0)