Skip to content

Commit bf391fe

Browse files
committed
re-apply
1 parent 9480df4 commit bf391fe

4 files changed

Lines changed: 15 additions & 15 deletions

File tree

filebeat/input/filestream/identifier_nonwindows_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ func TestFileIdentifierInodeMarker(t *testing.T) {
4848
}
4949
require.NoError(t, markerFile.Sync())
5050

51-
c := conf.MustNewConfigFrom(map[string]interface{}{
52-
"identifier": map[string]interface{}{
53-
"inode_marker": map[string]interface{}{
51+
c := conf.MustNewConfigFrom(map[string]any{
52+
"identifier": map[string]any{
53+
"inode_marker": map[string]any{
5454
"path": markerFile.Name(),
5555
},
5656
},

libbeat/processors/add_docker_metadata/add_docker_metadata.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ func (d *addDockerMetadata) resolveCIDFromPdata(body pcommon.Map) (string, error
402402
// resolveCIDFromSourcePath runs the configured source processor against a
403403
// synthetic event carrying only the log.file.path value, returning the
404404
// container ID
405-
func (d *addDockerMetadata) resolveCIDFromSourcePath(logFilePath interface{}) (string, error) {
405+
func (d *addDockerMetadata) resolveCIDFromSourcePath(logFilePath any) (string, error) {
406406
miniEvent := &beat.Event{Fields: mapstr.M{"log": mapstr.M{"file": mapstr.M{"path": logFilePath}}}}
407407
result, err := d.sourceProcessor.Run(miniEvent)
408408
if err != nil {

x-pack/libbeat/cmd/instance/receiver_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ type fakeActionDiagExtension struct {
152152
registeredDiagName string
153153
registeredActionFor string
154154
unregisteredFor string
155-
actionHandler func(ctx context.Context, params map[string]interface{}) (map[string]interface{}, error)
155+
actionHandler func(ctx context.Context, params map[string]any) (map[string]any, error)
156156
}
157157

158158
func (f *fakeActionDiagExtension) Start(context.Context, component.Host) error { return nil }
@@ -164,7 +164,7 @@ func (f *fakeActionDiagExtension) RegisterDiagnosticHook(name, _, _, _ string, _
164164
f.registeredDiagName = name
165165
}
166166

167-
func (f *fakeActionDiagExtension) RegisterActionHandler(name string, handler func(ctx context.Context, params map[string]interface{}) (map[string]interface{}, error)) error {
167+
func (f *fakeActionDiagExtension) RegisterActionHandler(name string, handler func(ctx context.Context, params map[string]any) (map[string]any, error)) error {
168168
f.mu.Lock()
169169
defer f.mu.Unlock()
170170
f.registeredActionFor = name
@@ -196,9 +196,9 @@ type fakeAction struct {
196196

197197
func (a *fakeAction) Name() string { return a.name }
198198

199-
func (a *fakeAction) Execute(_ context.Context, _ map[string]interface{}) (map[string]interface{}, error) {
199+
func (a *fakeAction) Execute(_ context.Context, _ map[string]any) (map[string]any, error) {
200200
a.executed.Store(true)
201-
return map[string]interface{}{"ok": true}, nil
201+
return map[string]any{"ok": true}, nil
202202
}
203203

204204
// TestBeatReceiverStart_WiresActionAndDiagnosticExtensions verifies that Start
@@ -271,9 +271,9 @@ func TestBeatReceiverStart_WiresActionAndDiagnosticExtensions(t *testing.T) {
271271
ext.mu.Unlock()
272272
require.NotNil(t, handler, "action handler should have been registered with the extension")
273273

274-
res, err := handler(t.Context(), map[string]interface{}{"id": "abc"})
274+
res, err := handler(t.Context(), map[string]any{"id": "abc"})
275275
require.NoError(t, err)
276-
assert.Equal(t, map[string]interface{}{"ok": true}, res)
276+
assert.Equal(t, map[string]any{"ok": true}, res)
277277
assert.True(t, act.executed.Load(), "invoking the registered handler should execute the underlying action")
278278

279279
b.Manager.UnregisterAction(act)

x-pack/otel/otelmanager/manager_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ import (
1919
// forwarding of RegisterAction/UnregisterAction.
2020
type fakeActionExtension struct {
2121
registeredName string
22-
handler func(ctx context.Context, params map[string]interface{}) (map[string]interface{}, error)
22+
handler func(ctx context.Context, params map[string]any) (map[string]any, error)
2323
unregisteredName string
2424
registerErr error
2525
}
2626

27-
func (f *fakeActionExtension) RegisterActionHandler(name string, handler func(ctx context.Context, params map[string]interface{}) (map[string]interface{}, error)) error {
27+
func (f *fakeActionExtension) RegisterActionHandler(name string, handler func(ctx context.Context, params map[string]any) (map[string]any, error)) error {
2828
f.registeredName = name
2929
f.handler = handler
3030
return f.registerErr
@@ -43,7 +43,7 @@ type fakeAction struct {
4343

4444
func (a *fakeAction) Name() string { return a.name }
4545

46-
func (a *fakeAction) Execute(_ context.Context, params map[string]interface{}) (map[string]interface{}, error) {
46+
func (a *fakeAction) Execute(_ context.Context, params map[string]any) (map[string]any, error) {
4747
a.executed = true
4848
return params, nil
4949
}
@@ -64,9 +64,9 @@ func TestOtelManager_RegisterAction(t *testing.T) {
6464
assert.Equal(t, "osquerybeatreceiver/_agent-component/osquery-default/stream", ext.registeredName)
6565
require.NotNil(t, ext.handler)
6666

67-
res, err := ext.handler(t.Context(), map[string]interface{}{"id": "abc"})
67+
res, err := ext.handler(t.Context(), map[string]any{"id": "abc"})
6868
require.NoError(t, err)
69-
assert.Equal(t, map[string]interface{}{"id": "abc"}, res)
69+
assert.Equal(t, map[string]any{"id": "abc"}, res)
7070
assert.True(t, action.executed, "invoking the registered handler should execute the underlying action")
7171

7272
m.UnregisterAction(action)

0 commit comments

Comments
 (0)