Skip to content

Commit 45f77cb

Browse files
committed
chore: minor changes
Signed-off-by: Ajay Mishra <[email protected]>
1 parent 0e4796c commit 45f77cb

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

health-monitors/kubernetes-object-monitor/pkg/controller/reconciler_test.go

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ func setupTestWithPolicies(t *testing.T, policies []config.Policy) *testSetup {
304304
}
305305

306306
type mockPublishedEvent struct {
307-
ctx context.Context
307+
ctx context.Context
308308
policy *config.Policy
309309
nodeName string
310310
isHealthy bool
@@ -314,12 +314,17 @@ type mockPublisher struct {
314314
publishedEvents []mockPublishedEvent
315315
}
316316

317-
func (m *mockPublisher) PublishHealthEvent(ctx context.Context, policy *config.Policy, nodeName string, isHealthy bool) error {
317+
func (m *mockPublisher) PublishHealthEvent(
318+
ctx context.Context,
319+
policy *config.Policy,
320+
nodeName string,
321+
isHealthy bool,
322+
) error {
318323
m.publishedEvents = append(m.publishedEvents, mockPublishedEvent{
319-
ctx: ctx,
320-
policy: policy,
321-
nodeName: nodeName,
322-
isHealthy: isHealthy,
324+
ctx: ctx,
325+
policy: policy,
326+
nodeName: nodeName,
327+
isHealthy: isHealthy,
323328
})
324329
return nil
325330
}

health-monitors/kubernetes-object-monitor/pkg/initializer/initializer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ func createManager(params Params) (ctrl.Manager, error) {
125125

126126
mgr, err := ctrl.NewManager(config, mgrOpts)
127127
if err != nil {
128-
return nil, err
128+
return nil, fmt.Errorf("failed to create manager: %w", err)
129129
}
130130

131131
return mgr, nil

0 commit comments

Comments
 (0)