Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

Commit

Permalink
test(integration): use a positive scenario for metric help
Browse files Browse the repository at this point in the history
  • Loading branch information
PixnBits committed May 14, 2020
1 parent d133259 commit c6d49a1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions __tests__/integration/one-app.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,14 @@ describe('Tests that require Docker setup', () => {
expect.assertions(1);
const response = await fetch(appAtTestUrls.fetchMetricsUrl);
const parsedMetrics = parsePrometheusTextFormat(await response.text());
const errors = parsedMetrics
.filter((metric) => (!metric.help) || metric.help.length === 0)
const allMetricNames = parsedMetrics
.map((metric) => metric.name);
expect(errors).toEqual([]);

const metricsNamesWithHelpInfo = parsedMetrics
.filter((metric) => metric.help && metric.help.length > 0)
.map((metric) => metric.name);

expect(metricsNamesWithHelpInfo).toEqual(allMetricNames);
});
});

Expand Down

0 comments on commit c6d49a1

Please sign in to comment.