diff --git a/ee/powereventwatcher/power_event_watcher_other.go b/ee/powereventwatcher/power_event_watcher_other.go index 676f82971..dd0d0d7a7 100644 --- a/ee/powereventwatcher/power_event_watcher_other.go +++ b/ee/powereventwatcher/power_event_watcher_other.go @@ -16,21 +16,13 @@ type noOpPowerEventWatcher struct { interrupted bool } -type knapsackSubscriber struct{} +type noOpKnapsackSubscriber struct{} -func NewKnapsackSubscriber(_ *slog.Logger, _ types.Knapsack) *knapsackSubscriber { - return &knapsackSubscriber{} +func NewKnapsackSubscriber(_ *slog.Logger, _ types.Knapsack) *noOpKnapsackSubscriber { + return &noOpKnapsackSubscriber{} } -func (ks *knapsackSubscriber) OnPowerEvent(_ int) error { - return nil -} - -func (ks *knapsackSubscriber) OnStartup() error { - return nil -} - -func New(ctx context.Context, _ types.Knapsack, _ *slog.Logger) (*noOpPowerEventWatcher, error) { +func New(ctx context.Context, _ *slog.Logger, _ *noOpKnapsackSubscriber) (*noOpPowerEventWatcher, error) { _, span := traces.StartSpan(ctx) defer span.End() diff --git a/ee/powereventwatcher/power_event_watcher_other_test.go b/ee/powereventwatcher/power_event_watcher_other_test.go index ca4b62525..5ad4907b4 100644 --- a/ee/powereventwatcher/power_event_watcher_other_test.go +++ b/ee/powereventwatcher/power_event_watcher_other_test.go @@ -17,7 +17,8 @@ import ( func TestInterrupt_Multiple(t *testing.T) { t.Parallel() - p, err := New(context.TODO(), typesmocks.NewKnapsack(t), multislogger.NewNopLogger()) + ksubscriber := NewKnapsackSubscriber(multislogger.NewNopLogger(), typesmocks.NewKnapsack(t)) + p, err := New(context.TODO(), multislogger.NewNopLogger(), ksubscriber) require.NoError(t, err) // Start and then interrupt