Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the "Elastic License
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
* Public License v 1"; you may not use this file except in compliance with, at
* your election, the "Elastic License 2.0", the "GNU Affero General Public
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import { globalTeardownHook } from '@kbn/scout';
import {
METRICS_TEST_INDEX_NAME,
METRICS_TEST_INDEX_NAME_OTHER,
} from '../fixtures/metrics_experience/constants';

globalTeardownHook('Teardown Discover tests data', async ({ esClient, apiServices, log }) => {
log.debug('[teardown:discover] resetting isEsqlDefault feature flag');
await apiServices.core.settings({
'feature_flags.overrides': {
'discover.isEsqlDefault': null,
},
});

log.debug('[teardown:metrics] deleting custom metrics test indices');
await esClient.indices.delete({ index: METRICS_TEST_INDEX_NAME, ignore_unavailable: true });
await esClient.indices.delete({ index: METRICS_TEST_INDEX_NAME_OTHER, ignore_unavailable: true });
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { globalTeardownHook } from '@kbn/scout';

globalTeardownHook('Teardown Discover Enhanced tests data', async ({ apiServices, log }) => {
log.debug('[teardown:discover-enhanced] resetting isEsqlDefault feature flag');
await apiServices.core.settings({
'feature_flags.overrides': {
'discover.isEsqlDefault': null,
},
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { globalTeardownHook } from '@kbn/scout';
import { OBSERVABILITY_STREAMS_ENABLE_SIGNIFICANT_EVENTS } from '@kbn/management-settings-ids';

globalTeardownHook('Teardown environment for Streams API tests', async ({ kbnClient, log }) => {
log.debug('[teardown] Disabling significant events feature...');
await kbnClient.uiSettings.unset(OBSERVABILITY_STREAMS_ENABLE_SIGNIFICANT_EVENTS);

log.debug('[teardown] Disabling Streams...');
await kbnClient.request({
method: 'POST',
path: '/api/streams/_disable',
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { globalTeardownHook } from '@kbn/scout';

globalTeardownHook('Teardown environment for streams tests', async ({ apiServices, log }) => {
log.debug('[teardown] Disabling streams...');
await apiServices.streams.disable();
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { globalTeardownHook } from '@kbn/scout';

globalTeardownHook('Teardown environment for streams tests', async ({ apiServices, log }) => {
log.debug('[teardown] Disabling streams...');
await apiServices.streams.disable();
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { globalTeardownHook } from '@kbn/scout-oblt';

globalTeardownHook('Teardown uptime test data', async ({ kbnClient, log }) => {
log.debug('[teardown] disabling legacy uptime app...');
await kbnClient.uiSettings.unset('observability:enableLegacyUptimeApp');
});
Loading