Skip to content

Commit

Permalink
[Telemetry][API Integration tests] Ensure .kibana index exists (#76662)
Browse files Browse the repository at this point in the history
Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
afharo and elasticmachine authored Sep 10, 2020
1 parent 0f249d7 commit ad62fa0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/api_integration/apis/stats/stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,12 @@ const assertStatsAndMetrics = (body) => {

export default function ({ getService }) {
const supertest = getService('supertest');
const esArchiver = getService('esArchiver');

describe('kibana stats api', () => {
before('make sure there are some saved objects', () => esArchiver.load('saved_objects/basic'));
after('cleanup saved objects changes', () => esArchiver.unload('saved_objects/basic'));

describe('basic', () => {
it('should return the stats without cluster_uuid with no query string params', () => {
return supertest
Expand Down
4 changes: 4 additions & 0 deletions test/api_integration/apis/telemetry/telemetry_local.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,12 @@ function flatKeys(source) {
export default function ({ getService }) {
const supertest = getService('supertest');
const es = getService('es');
const esArchiver = getService('esArchiver');

describe('/api/telemetry/v2/clusters/_stats', () => {
before('make sure there are some saved objects', () => esArchiver.load('saved_objects/basic'));
after('cleanup saved objects changes', () => esArchiver.unload('saved_objects/basic'));

before('create some telemetry-data tracked indices', async () => {
return es.indices.create({ index: 'filebeat-telemetry_tests_logs' });
});
Expand Down

0 comments on commit ad62fa0

Please sign in to comment.