Skip to content

Commit 2d9c182

Browse files
committed
Make the monitoring e2e test more restrictive
1 parent c9d4314 commit 2d9c182

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

testing/integration/beat_receivers_test.go

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,14 @@ import (
1717

1818
"gopkg.in/yaml.v2"
1919

20+
"github.com/gofrs/uuid/v5"
21+
"github.com/stretchr/testify/require"
22+
2023
"github.com/elastic/elastic-agent-libs/kibana"
2124
"github.com/elastic/elastic-agent-libs/testing/estools"
2225
atesting "github.com/elastic/elastic-agent/pkg/testing"
2326
"github.com/elastic/elastic-agent/pkg/testing/define"
2427
"github.com/elastic/elastic-agent/pkg/testing/tools/testcontext"
25-
"github.com/gofrs/uuid/v5"
26-
"github.com/stretchr/testify/require"
2728
)
2829

2930
var (
@@ -308,22 +309,19 @@ func TestAgentMonitoring(t *testing.T) {
308309
// Expected to change between agentDocs and OtelDocs
309310
"@timestamp",
310311
"agent.ephemeral_id",
312+
// agent.id is different because it's the id of the underlying beat
311313
"agent.id",
314+
// agent.version is different because we force version 9.0.0 in CI
312315
"agent.version",
316+
// elastic_agent.id is different because we currently start a new agent in the second subtest
317+
// this should be fixed in the future
318+
"elastic_agent.id",
313319
"data_stream.namespace",
314320
"log.file.inode",
315321
"log.file.fingerprint",
316322
"log.file.path",
317323
"log.offset",
318-
319-
// needs investigation
320-
"event.agent_id_status",
321324
"event.ingested",
322-
323-
// elastic_agent * fields are hardcoded in processor list for now which is why they differ
324-
"elastic_agent.id",
325-
"elastic_agent.snapshot",
326-
"elastic_agent.version",
327325
}
328326

329327
AssertMapsEqual(t, agent, otel, ignoredFields, "expected documents to be equal")

0 commit comments

Comments
 (0)