Update prometheus test to reflect new collector behavior (#5417)

This commit is contained in:
jack-berg 2023-05-03 18:50:44 -05:00 committed by GitHub
parent 6ba5919229
commit f4184dfde8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -156,11 +156,11 @@ class CollectorIntegrationTest {
assertThat(resourceMetrics.getScopeMetricsCount()).isEqualTo(1);
ScopeMetrics scopeMetrics = resourceMetrics.getScopeMetrics(0);
assertThat(scopeMetrics.getScope().getName()).isEqualTo("");
assertThat(scopeMetrics.getScope().getName()).isEqualTo("otelcol/prometheusreceiver");
Optional<Metric> optRequestTotal =
scopeMetrics.getMetricsList().stream()
.filter(metric -> metric.getName().equals("requests_total"))
.filter(metric -> metric.getName().equals("requests"))
.findFirst();
assertThat(optRequestTotal).isPresent();
Metric requestTotal = optRequestTotal.get();