Skip to content

Commit 1dc723b

Browse files
authored
Use the right testing fixture for assertions
1 parent aba6cc1 commit 1dc723b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

testing/integration/ess/beat_receivers_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -891,21 +891,21 @@ outputs:
891891
assert.NoError(collect, statusErr)
892892
// we should be running beats processes for components with default output even though the otel runtime was requested
893893
// agent should be healthy
894-
assert.Equal(t, int(cproto.State_HEALTHY), status.State)
895-
assert.Equal(t, 5, len(status.Components))
894+
assert.Equal(collect, int(cproto.State_HEALTHY), status.State)
895+
assert.Equal(collect, 5, len(status.Components))
896896

897897
// all the components should be healthy, their units should be healthy, and they should identify
898898
// themselves as running in the process runtime if they're using the default or monitoring outputs
899899
for _, comp := range status.Components {
900-
assert.Equal(t, int(cproto.State_HEALTHY), comp.State)
900+
assert.Equal(collect, int(cproto.State_HEALTHY), comp.State)
901901
expectedComponentVersionInfoName := componentVersionInfoNameForRuntime(component.OtelRuntimeManager)
902902
if strings.HasSuffix(comp.Name, "default") || strings.HasSuffix(comp.Name, "monitoring") {
903903
expectedComponentVersionInfoName = componentVersionInfoNameForRuntime(component.ProcessRuntimeManager)
904904
}
905-
assert.Equal(t, expectedComponentVersionInfoName, comp.VersionInfo.Name)
906-
assert.Equal(t, expectedComponentVersionInfoName, comp.VersionInfo.Name)
905+
assert.Equal(collect, expectedComponentVersionInfoName, comp.VersionInfo.Name)
906+
assert.Equal(collect, expectedComponentVersionInfoName, comp.VersionInfo.Name)
907907
for _, unit := range comp.Units {
908-
assert.Equal(t, int(cproto.State_HEALTHY), unit.State)
908+
assert.Equal(collect, int(cproto.State_HEALTHY), unit.State)
909909
}
910910
}
911911
}, 1*time.Minute, 1*time.Second)

0 commit comments

Comments
 (0)