Skip to content

Commit 324d541

Browse files
belimawrmergify[bot]
authored andcommitted
Update journald tests now that Filebeat supports watching folders (#10131)
(cherry picked from commit 5f0f2fd) # Conflicts: # .package-version # NOTICE-fips.txt # NOTICE.txt # go.mod # go.sum # internal/pkg/otel/translate/otelconfig_test.go
1 parent 8e697a6 commit 324d541

File tree

8 files changed

+130
-10
lines changed

8 files changed

+130
-10
lines changed

.package-version

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
{
2+
<<<<<<< HEAD
23
"version": "9.1.4-SNAPSHOT",
34
"build_id": "9.1.4-01a3f106",
45
"manifest_url": "https://snapshots.elastic.co/9.1.4-01a3f106/manifest-9.1.4-SNAPSHOT.json",
56
"summary_url": "https://snapshots.elastic.co/9.1.4-01a3f106/summary-9.1.4-SNAPSHOT.html",
67
"core_version": "9.1.4",
78
"stack_build_id": "9.1.4-01a3f106-SNAPSHOT"
9+
=======
10+
"version": "9.2.0-SNAPSHOT",
11+
"build_id": "9.2.0-b72ad686",
12+
"manifest_url": "https://snapshots.elastic.co/9.2.0-b72ad686/manifest-9.2.0-SNAPSHOT.json",
13+
"summary_url": "https://snapshots.elastic.co/9.2.0-b72ad686/summary-9.2.0-SNAPSHOT.html",
14+
"core_version": "9.2.0",
15+
"stack_build_id": "9.2.0-b72ad686-SNAPSHOT"
16+
>>>>>>> 5f0f2fd3b (Update journald tests now that Filebeat supports watching folders (#10131))
817
}

NOTICE-fips.txt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -787,11 +787,19 @@ Contents of probable licence file $GOMODCACHE/github.com/dolmen-go/contextio@v0.
787787

788788
--------------------------------------------------------------------------------
789789
Dependency : github.com/elastic/beats/v7
790+
<<<<<<< HEAD
790791
Version: v7.0.0-alpha2.0.20250919143820-93395fd0dba0
791792
Licence type (autodetected): Elastic
792793
--------------------------------------------------------------------------------
793794

794795
Contents of probable licence file $GOMODCACHE/github.com/elastic/beats/[email protected]/LICENSE.txt:
796+
=======
797+
Version: v7.0.0-alpha2.0.20250924190604-3dc72030429f
798+
Licence type (autodetected): Elastic
799+
--------------------------------------------------------------------------------
800+
801+
Contents of probable licence file $GOMODCACHE/github.com/elastic/beats/[email protected]/LICENSE.txt:
802+
>>>>>>> 5f0f2fd3b (Update journald tests now that Filebeat supports watching folders (#10131))
795803

796804
Source code in this repository is variously licensed under the Apache License
797805
Version 2.0, an Apache compatible license, or the Elastic License. Outside of
@@ -18611,11 +18619,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1861118619

1861218620
--------------------------------------------------------------------------------
1861318621
Dependency : golang.org/x/text
18614-
Version: v0.28.0
18622+
Version: v0.29.0
1861518623
Licence type (autodetected): BSD-3-Clause
1861618624
--------------------------------------------------------------------------------
1861718625

18618-
Contents of probable licence file $GOMODCACHE/golang.org/x/text@v0.28.0/LICENSE:
18626+
Contents of probable licence file $GOMODCACHE/golang.org/x/text@v0.29.0/LICENSE:
1861918627

1862018628
Copyright 2009 The Go Authors.
1862118629

NOTICE.txt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -787,11 +787,19 @@ Contents of probable licence file $GOMODCACHE/github.com/dolmen-go/contextio@v0.
787787

788788
--------------------------------------------------------------------------------
789789
Dependency : github.com/elastic/beats/v7
790+
<<<<<<< HEAD
790791
Version: v7.0.0-alpha2.0.20250919143820-93395fd0dba0
791792
Licence type (autodetected): Elastic
792793
--------------------------------------------------------------------------------
793794

794795
Contents of probable licence file $GOMODCACHE/github.com/elastic/beats/[email protected]/LICENSE.txt:
796+
=======
797+
Version: v7.0.0-alpha2.0.20250924190604-3dc72030429f
798+
Licence type (autodetected): Elastic
799+
--------------------------------------------------------------------------------
800+
801+
Contents of probable licence file $GOMODCACHE/github.com/elastic/beats/[email protected]/LICENSE.txt:
802+
>>>>>>> 5f0f2fd3b (Update journald tests now that Filebeat supports watching folders (#10131))
795803

796804
Source code in this repository is variously licensed under the Apache License
797805
Version 2.0, an Apache compatible license, or the Elastic License. Outside of
@@ -19244,11 +19252,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1924419252

1924519253
--------------------------------------------------------------------------------
1924619254
Dependency : golang.org/x/text
19247-
Version: v0.28.0
19255+
Version: v0.29.0
1924819256
Licence type (autodetected): BSD-3-Clause
1924919257
--------------------------------------------------------------------------------
1925019258

19251-
Contents of probable licence file $GOMODCACHE/golang.org/x/text@v0.28.0/LICENSE:
19259+
Contents of probable licence file $GOMODCACHE/golang.org/x/text@v0.29.0/LICENSE:
1925219260

1925319261
Copyright 2009 The Go Authors.
1925419262

go.mod

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ require (
1414
github.com/docker/docker v28.3.3+incompatible
1515
github.com/docker/go-units v0.5.0
1616
github.com/dolmen-go/contextio v0.0.0-20200217195037-68fc5150bcd5
17+
<<<<<<< HEAD
1718
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20250919143820-93395fd0dba0
19+
=======
20+
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20250924190604-3dc72030429f
21+
>>>>>>> 5f0f2fd3b (Update journald tests now that Filebeat supports watching folders (#10131))
1822
github.com/elastic/cloud-on-k8s/v2 v2.0.0-20250327073047-b624240832ae
1923
github.com/elastic/elastic-agent-autodiscover v0.10.0
2024
github.com/elastic/elastic-agent-client/v7 v7.17.2
@@ -88,10 +92,17 @@ require (
8892
golang.org/x/exp v0.0.0-20250215185904-eff6e970281f
8993
golang.org/x/mod v0.27.0
9094
golang.org/x/net v0.43.0
95+
<<<<<<< HEAD
9196
golang.org/x/sync v0.16.0
9297
golang.org/x/sys v0.35.0
9398
golang.org/x/term v0.34.0
9499
golang.org/x/text v0.28.0
100+
=======
101+
golang.org/x/sync v0.17.0
102+
golang.org/x/sys v0.36.0
103+
golang.org/x/term v0.35.0
104+
golang.org/x/text v0.29.0
105+
>>>>>>> 5f0f2fd3b (Update journald tests now that Filebeat supports watching folders (#10131))
95106
golang.org/x/time v0.12.0
96107
golang.org/x/tools v0.36.0
97108
google.golang.org/api v0.238.0
@@ -321,8 +332,8 @@ require (
321332
github.com/docker/docker-credential-helpers v0.8.2 // indirect
322333
github.com/docker/go-connections v0.5.0 // indirect
323334
github.com/docker/go-metrics v0.0.1 // indirect
324-
github.com/dop251/goja v0.0.0-20250309171923-bcd7cc6bf64c // indirect
325-
github.com/dop251/goja_nodejs v0.0.0-20250309172600-86a40d630cdd // indirect
335+
github.com/dop251/goja v0.0.0-20250630131328-58d95d85e994 // indirect
336+
github.com/dop251/goja_nodejs v0.0.0-20250409162600-f7acab6894b0 // indirect
326337
github.com/dustin/go-humanize v1.0.1 // indirect
327338
github.com/eapache/go-resiliency v1.7.0 // indirect
328339
github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 // indirect

go.sum

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,8 +483,13 @@ github.com/elastic/azure-sdk-for-go/sdk/resourcemanager/consumption/armconsumpti
483483
github.com/elastic/azure-sdk-for-go/sdk/resourcemanager/consumption/armconsumption v1.1.0-elastic/go.mod h1:0vCBR1wgGwZeGmloJ+eCWIZF2S47grTXRzj2mftg2Nk=
484484
github.com/elastic/bayeux v1.0.5 h1:UceFq01ipmT3S8DzFK+uVAkbCdiPR0Bqei8qIGmUeY0=
485485
github.com/elastic/bayeux v1.0.5/go.mod h1:CSI4iP7qeo5MMlkznGvYKftp8M7qqP/3nzmVZoXHY68=
486+
<<<<<<< HEAD
486487
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20250919143820-93395fd0dba0 h1:ITBSGp8aow1EV7NJ4IbHrJ/pGBp30RMn+oId8TTX9u0=
487488
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20250919143820-93395fd0dba0/go.mod h1:F7DG4+RuHE5sVtqzk2swGBsc8+W2LH24V1nEhAHXEyY=
489+
=======
490+
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20250924190604-3dc72030429f h1:A8N/bfbc/kvKOo9gu7JruzAauqMPXDnQ50jwBKAdcyo=
491+
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20250924190604-3dc72030429f/go.mod h1:mxbP+JnIgGEDzOfEK7gNq8v3d6dPC2jzAt4q/QHsnt0=
492+
>>>>>>> 5f0f2fd3b (Update journald tests now that Filebeat supports watching folders (#10131))
488493
github.com/elastic/cloud-on-k8s/v2 v2.0.0-20250327073047-b624240832ae h1:OiShmbWAyGU0MS0ADJWr1/QgeLIZliMk9xsrFicR3/s=
489494
github.com/elastic/cloud-on-k8s/v2 v2.0.0-20250327073047-b624240832ae/go.mod h1:D2IckZVXARugvikE4fv1glvaJMohKSZRzrPsxCjo9O0=
490495
github.com/elastic/elastic-agent-autodiscover v0.10.0 h1:WJ4zl9uSfk1kHmn2B/0byQBLIL607Zt4LNfOgV7+XN0=
@@ -2050,8 +2055,8 @@ golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
20502055
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
20512056
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
20522057
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
2053-
golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng=
2054-
golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU=
2058+
golang.org/x/text v0.29.0 h1:1neNs90w9YzJ9BocxfsQNHKuAT4pkghyXc4nhZ6sJvk=
2059+
golang.org/x/text v0.29.0/go.mod h1:7MhJOA9CD2qZyOKYazxdYMF85OwPdEr9jTtBpO7ydH4=
20552060
golang.org/x/time v0.12.0 h1:ScB/8o8olJvc+CQPWrK3fPZNfh7qgwCrY0zJmoEQLSE=
20562061
golang.org/x/time v0.12.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg=
20572062
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=

internal/pkg/otel/translate/otelconfig_test.go

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,16 @@ func TestGetOtelConfig(t *testing.T) {
250250
"logs_dynamic_id": map[string]any{
251251
"enabled": true,
252252
},
253+
<<<<<<< HEAD
253254
"timeout": 90 * time.Second,
254255
"idle_conn_timeout": 3 * time.Second,
255256
},
257+
=======
258+
"auth": map[string]any{
259+
"authenticator": "beatsauth/_agent-component/" + outputName,
260+
},
261+
}
262+
>>>>>>> 5f0f2fd3b (Update journald tests now that Filebeat supports watching folders (#10131))
256263
}
257264

258265
defaultProcessors := func(streamId, dataset string, namespace string) []any {
@@ -312,6 +319,75 @@ func TestGetOtelConfig(t *testing.T) {
312319
}
313320
}
314321

322+
<<<<<<< HEAD
323+
=======
324+
// expects input id
325+
expectedFilestreamConfig := func(id string) map[string]any {
326+
return map[string]any{
327+
"filebeat": map[string]any{
328+
"inputs": []map[string]any{
329+
{
330+
"id": "test-1",
331+
"type": "filestream",
332+
"data_stream": map[string]any{
333+
"dataset": "generic-1",
334+
},
335+
"paths": []any{
336+
"/var/log/*.log",
337+
},
338+
"index": "logs-generic-1-default",
339+
"processors": defaultProcessors("test-1", "generic-1", "logs"),
340+
},
341+
{
342+
"id": "test-2",
343+
"type": "filestream",
344+
"data_stream": map[string]any{
345+
"dataset": "generic-2",
346+
},
347+
"paths": []any{
348+
"/var/log/*.log",
349+
},
350+
"index": "logs-generic-2-default",
351+
"processors": defaultProcessors("test-2", "generic-2", "logs"),
352+
},
353+
},
354+
},
355+
"output": map[string]any{
356+
"otelconsumer": map[string]any{},
357+
},
358+
"path": map[string]any{
359+
"data": filepath.Join(paths.Run(), id),
360+
},
361+
"queue": map[string]any{
362+
"mem": map[string]any{
363+
"events": uint64(3200),
364+
"flush": map[string]any{
365+
"min_events": uint64(1600),
366+
"timeout": "10s",
367+
},
368+
},
369+
},
370+
"logging": map[string]any{
371+
"with_fields": map[string]any{
372+
"component": map[string]any{
373+
"binary": "filebeat",
374+
"dataset": "elastic_agent.filebeat",
375+
"type": "filestream",
376+
"id": id,
377+
},
378+
"log": map[string]any{
379+
"source": id,
380+
},
381+
},
382+
},
383+
"http": map[string]any{
384+
"enabled": true,
385+
"host": "localhost",
386+
},
387+
}
388+
}
389+
390+
>>>>>>> 5f0f2fd3b (Update journald tests now that Filebeat supports watching folders (#10131))
315391
getBeatMonitoringConfig := func(_, _ string) map[string]any {
316392
return map[string]any{
317393
"http": map[string]any{

testing/integration/k8s/testdata/journald-input.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@ inputs:
1919
streams:
2020
- id: journald-input-id
2121
paths:
22-
- "/opt/journald/*/*"
22+
- "/opt/journald/"
23+
merge: true

testing/integration/k8s/testdata/journald-otel.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ receivers:
55
- type: journald
66
id: journald-input
77
paths:
8-
- /opt/journal/*/*
8+
- /opt/journal/
9+
merge: true
10+
911
output:
1012
otelconsumer:
1113
logging:

0 commit comments

Comments
 (0)