Skip to content

Commit cd06801

Browse files
committed
fix conflicts
1 parent 2534caf commit cd06801

3 files changed

Lines changed: 0 additions & 87 deletions

File tree

libbeat/beat/info.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,10 @@ type Info struct {
4242
UserAgent string // A string of the user-agent that can be passed to any outputs or network connections
4343
FIPSDistribution bool // If the beat was compiled as a FIPS distribution.
4444

45-
<<<<<<< HEAD
46-
LogConsumer consumer.Logs // otel log consumer
47-
ComponentID string // otel component id from the collector config e.g. "filebeatreceiver/logs"
48-
Logger *logp.Logger
49-
=======
5045
LogConsumer consumer.Logs // otel log consumer
5146
ComponentID string // otel component id from the collector config e.g. "filebeatreceiver/logs"
5247
IncludeMetadata bool // when true, otelconsumer includes @metadata in the log record body
5348
Logger *logp.Logger
54-
Paths *paths.Path // per beat paths definition
55-
>>>>>>> 2e949e6c4 (otel: option to preserve at metadata field in log record body (#50191))
5649
}
5750

5851
func (i Info) FQDNAwareHostname(useFQDN bool) string {

x-pack/filebeat/fbreceiver/config_test.go

Lines changed: 0 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -10,82 +10,6 @@ import (
1010
"github.com/stretchr/testify/assert"
1111
)
1212

13-
<<<<<<< HEAD
14-
=======
15-
func TestUnmarshal(t *testing.T) {
16-
t.Run("partial path override preserves defaults", func(t *testing.T) {
17-
cfg := &Config{
18-
Beatconfig: map[string]any{
19-
"path": map[string]any{
20-
"home": "/default/home",
21-
"data": "/default/data",
22-
},
23-
},
24-
}
25-
26-
userConf := confmap.NewFromStringMap(map[string]any{
27-
"path.home": "/custom/home",
28-
"filebeat": map[string]any{"inputs": []any{}},
29-
})
30-
31-
require.NoError(t, cfg.Unmarshal(userConf))
32-
33-
pathMap, ok := cfg.Beatconfig["path"].(map[string]any)
34-
require.True(t, ok, "path should be a map")
35-
assert.Equal(t, "/custom/home", pathMap["home"], "user override should win")
36-
assert.Equal(t, "/default/data", pathMap["data"], "unspecified default should be preserved")
37-
assert.Contains(t, cfg.Beatconfig, "filebeat")
38-
})
39-
40-
t.Run("no defaults does not error", func(t *testing.T) {
41-
cfg := &Config{}
42-
43-
userConf := confmap.NewFromStringMap(map[string]any{
44-
"filebeat": map[string]any{"inputs": []any{}},
45-
})
46-
47-
require.NoError(t, cfg.Unmarshal(userConf))
48-
assert.Contains(t, cfg.Beatconfig, "filebeat")
49-
})
50-
51-
t.Run("full path override replaces both", func(t *testing.T) {
52-
cfg := &Config{
53-
Beatconfig: map[string]any{
54-
"path": map[string]any{
55-
"home": "/default/home",
56-
"data": "/default/data",
57-
},
58-
},
59-
}
60-
61-
userConf := confmap.NewFromStringMap(map[string]any{
62-
"path": map[string]any{
63-
"home": "/custom/home",
64-
"data": "/custom/data",
65-
},
66-
"filebeat": map[string]any{"inputs": []any{}},
67-
})
68-
69-
require.NoError(t, cfg.Unmarshal(userConf))
70-
71-
pathMap, ok := cfg.Beatconfig["path"].(map[string]any)
72-
require.True(t, ok)
73-
assert.Equal(t, "/custom/home", pathMap["home"])
74-
assert.Equal(t, "/custom/data", pathMap["data"])
75-
})
76-
}
77-
78-
func TestUnmarshalIncludeMetadata(t *testing.T) {
79-
cfg := &Config{}
80-
userConf := confmap.NewFromStringMap(map[string]any{
81-
"include_metadata": true,
82-
"filebeat": map[string]any{"inputs": []any{}},
83-
})
84-
require.NoError(t, cfg.Unmarshal(userConf))
85-
assert.Equal(t, true, cfg.Beatconfig["include_metadata"])
86-
}
87-
88-
>>>>>>> 2e949e6c4 (otel: option to preserve at metadata field in log record body (#50191))
8913
func TestValidate(t *testing.T) {
9014
tests := map[string]struct {
9115
c *Config

x-pack/filebeat/tests/integration/otel_kafka_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,8 @@ import (
1717
"github.com/stretchr/testify/assert"
1818
"github.com/stretchr/testify/require"
1919

20-
<<<<<<< HEAD
21-
"github.com/elastic/beats/v7/x-pack/otel/otelmap"
22-
=======
2320
"github.com/elastic/beats/v7/libbeat/tests/integration"
2421
"github.com/elastic/beats/v7/x-pack/otel/oteltest"
25-
>>>>>>> 2e949e6c4 (otel: option to preserve at metadata field in log record body (#50191))
2622
"github.com/elastic/beats/v7/x-pack/otel/oteltestcol"
2723
"github.com/elastic/elastic-agent-libs/mapstr"
2824
"github.com/elastic/sarama"

0 commit comments

Comments
 (0)