Skip to content

Commit 259dd3e

Browse files
authored
otel(tests): skip flaky assertion in TestContainerCMDAgentMonitoringRuntimeExperimental (#11231)
1 parent 2b2dff7 commit 259dd3e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

testing/integration/ess/container_cmd_test.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -550,9 +550,12 @@ func TestContainerCMDAgentMonitoringRuntimeExperimental(t *testing.T) {
550550
}
551551
t.Logf("Component ID: %s, version info: %s, runtime: %s", comp.ID, comp.VersionInfo.Name, compRuntime)
552552
switch comp.ID {
553-
case "beat/metrics-monitoring", "filestream-monitoring", "http/metrics-monitoring", "prometheus/metrics-monitoring":
553+
case "beat/metrics-monitoring", "filestream-monitoring", "prometheus/metrics-monitoring":
554554
// Monitoring components should use the expected runtime
555555
assert.Equalf(t, tc.expectedRuntimeName, compRuntime, "expected correct runtime name for monitoring component %s with id %s", comp.Name, comp.ID)
556+
case "http/metrics-monitoring":
557+
// The comp.VersionInfo.Name for this component is empty at times.
558+
// See https://github.com/elastic/elastic-agent/issues/11162.
556559
default:
557560
// Non-monitoring components should use the default runtime
558561
assert.Equalf(t, string(component.DefaultRuntimeManager), compRuntime, "expected default runtime for non-monitoring component %s with id %s", comp.Name, comp.ID)
@@ -671,9 +674,12 @@ func TestContainerCMDAgentMonitoringRuntimeExperimentalPolicy(t *testing.T) {
671674
}
672675
t.Logf("Component ID: %s, version info: %s, runtime: %s", comp.ID, comp.VersionInfo.Name, compRuntime)
673676
switch comp.ID {
674-
case "beat/metrics-monitoring", "filestream-monitoring", "http/metrics-monitoring", "prometheus/metrics-monitoring":
677+
case "beat/metrics-monitoring", "filestream-monitoring", "prometheus/metrics-monitoring":
675678
// Monitoring components should use the expected runtime
676679
assert.Equalf(t, tc.expectedRuntimeName, compRuntime, "unexpected runtime name for monitoring component %s with id %s", comp.Name, comp.ID)
680+
case "http/metrics-monitoring":
681+
// The comp.VersionInfo.Name for this component is empty at times.
682+
// See https://github.com/elastic/elastic-agent/issues/11162.
677683
default:
678684
// Non-monitoring components should use the default runtime
679685
assert.Equalf(t, string(component.DefaultRuntimeManager), compRuntime, "expected default runtime for non-monitoring component %s with id %s", comp.Name, comp.ID)

0 commit comments

Comments
 (0)