Skip to content

Commit d827ce5

Browse files
committed
Add test for hostSystemOverview metric
1 parent 2179dc7 commit d827ce5

File tree

1 file changed

+22
-0
lines changed
  • x-pack/test/api_integration/apis/metrics_ui

1 file changed

+22
-0
lines changed

x-pack/test/api_integration/apis/metrics_ui/metrics.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,5 +93,27 @@ export default function ({ getService }: FtrProviderContext) {
9393
expect(resp.metrics.length).to.equal(2);
9494
});
9595
});
96+
97+
it('should return multiple values for hostSystemOverview metric', () => {
98+
const data = fetchNodeDetails({
99+
sourceId: 'default',
100+
metrics: ['hostSystemOverview'],
101+
timerange: {
102+
to: max,
103+
from: min,
104+
interval: '>=1m',
105+
},
106+
nodeId: 'demo-stack-mysql-01',
107+
nodeType: 'host' as InfraNodeType,
108+
});
109+
return data.then((resp) => {
110+
if (!resp) {
111+
return;
112+
}
113+
114+
const hostSystemOverviewMetric = resp.metrics.find((metric) => metric.id == 'hostSystemOverview')
115+
expect(hostSystemOverviewMetric?.series.length).to.be.greaterThan(1);
116+
});
117+
});
96118
});
97119
}

0 commit comments

Comments
 (0)