Skip to content

Commit 42ab528

Browse files
committed
Remove useless function
1 parent e974d86 commit 42ab528

2 files changed

Lines changed: 2 additions & 8 deletions

File tree

plugins/inputs/windows_event_log/wineventlog/mock_windows_event_api.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,6 @@ func (m *MockWindowsEventAPI) AddMockEventsForQuery(events []*MockEventRecord) {
165165
m.queryEvents[handle] = events
166166
}
167167

168-
// Deprecated: Use AddMockEventsForSubscription or AddMockEventsForQuery instead
169-
func (m *MockWindowsEventAPI) AddMockEvents(events []*MockEventRecord) {
170-
// For backward compatibility, add to query events
171-
m.AddMockEventsForQuery(events)
172-
}
173-
174168
// Configuration methods
175169
func (m *MockWindowsEventAPI) SetSubscribeFailure(shouldFail bool, err error) {
176170
m.shouldFailSubscribe = shouldFail

plugins/inputs/windows_event_log/wineventlog/wineventlog_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ func TestReadGaps(t *testing.T) {
123123
mockAPI := NewMockWindowsEventAPI()
124124
elog.SetEventAPI(mockAPI)
125125

126-
mockAPI.AddMockEvents(createMockEventRecordsRange(100, 105))
126+
mockAPI.AddMockEventsForQuery(createMockEventRecordsRange(100, 105))
127127

128128
elog.Init()
129129

@@ -214,7 +214,7 @@ func TestReadGaps(t *testing.T) {
214214
mockAPI := NewMockWindowsEventAPI()
215215
elog.SetEventAPI(mockAPI)
216216

217-
mockAPI.AddMockEvents(createMockEventRecordsRange(0, 5))
217+
mockAPI.AddMockEventsForQuery(createMockEventRecordsRange(0, 5))
218218

219219
elog.Init()
220220

0 commit comments

Comments
 (0)