mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
[APM] Remove power_user
and read_only_user
folders from e2e (#164242)
We currently separate e2e tests into `power_user` tests and `read_only_user` tests. We often want to test different permissions within the same tests, so the distinction becomes a barrier rather than a help. This PR removed the folders and combines all tests regardless of which user they run as.
This commit is contained in:
parent
00102e33f3
commit
ebe6b4650a
54 changed files with 62 additions and 102 deletions
|
@ -30,7 +30,7 @@ export const IGNORE_FILE_GLOBS = [
|
||||||
'x-pack/plugins/cases/docs/**/*',
|
'x-pack/plugins/cases/docs/**/*',
|
||||||
'x-pack/plugins/monitoring/public/lib/jquery_flot/**/*',
|
'x-pack/plugins/monitoring/public/lib/jquery_flot/**/*',
|
||||||
'x-pack/plugins/fleet/cypress/packages/*.zip',
|
'x-pack/plugins/fleet/cypress/packages/*.zip',
|
||||||
'x-pack/plugins/apm/ftr_e2e/cypress/e2e/power_user/diagnostics/apm-diagnostics-*.json',
|
'**/apm-diagnostics-*.json',
|
||||||
'**/.*',
|
'**/.*',
|
||||||
'**/__mocks__/**/*',
|
'**/__mocks__/**/*',
|
||||||
'x-pack/docs/**/*',
|
'x-pack/docs/**/*',
|
||||||
|
|
|
@ -4,9 +4,9 @@
|
||||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
import { synthtrace } from '../../../synthtrace';
|
import { synthtrace } from '../../synthtrace';
|
||||||
import { opbeans } from '../../fixtures/synthtrace/opbeans';
|
import { opbeans } from '../fixtures/synthtrace/opbeans';
|
||||||
import { checkA11y } from '../../support/commands';
|
import { checkA11y } from '../support/commands';
|
||||||
|
|
||||||
const start = '2021-10-10T00:00:00.000Z';
|
const start = '2021-10-10T00:00:00.000Z';
|
||||||
const end = '2021-10-10T00:15:00.000Z';
|
const end = '2021-10-10T00:15:00.000Z';
|
|
@ -6,8 +6,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import url from 'url';
|
import url from 'url';
|
||||||
import { synthtrace } from '../../../../synthtrace';
|
import { synthtrace } from '../../../synthtrace';
|
||||||
import { opbeans } from '../../../fixtures/synthtrace/opbeans';
|
import { opbeans } from '../../fixtures/synthtrace/opbeans';
|
||||||
|
|
||||||
const start = '2021-10-10T00:00:00.000Z';
|
const start = '2021-10-10T00:00:00.000Z';
|
||||||
const end = '2021-10-10T00:15:00.000Z';
|
const end = '2021-10-10T00:15:00.000Z';
|
|
@ -158,7 +158,7 @@ describe('Diagnostics', () => {
|
||||||
function importBundle() {
|
function importBundle() {
|
||||||
cy.visitKibana('/app/apm/diagnostics/import-export');
|
cy.visitKibana('/app/apm/diagnostics/import-export');
|
||||||
cy.get('#file-picker').selectFile(
|
cy.get('#file-picker').selectFile(
|
||||||
'./cypress/e2e/power_user/diagnostics/apm-diagnostics-8.8.0-1687436214804.json'
|
'./cypress/e2e/diagnostics/apm-diagnostics-8.8.0-1687436214804.json'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
|
|
||||||
import { getErrorGroupingKey } from '@kbn/apm-synthtrace-client/src/lib/apm/instance';
|
import { getErrorGroupingKey } from '@kbn/apm-synthtrace-client/src/lib/apm/instance';
|
||||||
import url from 'url';
|
import url from 'url';
|
||||||
import { synthtrace } from '../../../../synthtrace';
|
import { synthtrace } from '../../../synthtrace';
|
||||||
import { checkA11y } from '../../../support/commands';
|
import { checkA11y } from '../../support/commands';
|
||||||
import { generateData } from './generate_data';
|
import { generateData } from './generate_data';
|
||||||
|
|
||||||
const start = '2021-10-10T00:00:00.000Z';
|
const start = '2021-10-10T00:00:00.000Z';
|
|
@ -6,8 +6,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import url from 'url';
|
import url from 'url';
|
||||||
import { synthtrace } from '../../../../synthtrace';
|
import { synthtrace } from '../../../synthtrace';
|
||||||
import { checkA11y } from '../../../support/commands';
|
import { checkA11y } from '../../support/commands';
|
||||||
import { generateData, generateErrors } from './generate_data';
|
import { generateData, generateErrors } from './generate_data';
|
||||||
|
|
||||||
const start = '2021-10-10T00:00:00.000Z';
|
const start = '2021-10-10T00:00:00.000Z';
|
|
@ -5,8 +5,8 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { synthtrace } from '../../../../synthtrace';
|
import { synthtrace } from '../../../synthtrace';
|
||||||
import { opbeans } from '../../../fixtures/synthtrace/opbeans';
|
import { opbeans } from '../../fixtures/synthtrace/opbeans';
|
||||||
|
|
||||||
const start = '2021-10-10T00:00:00.000Z';
|
const start = '2021-10-10T00:00:00.000Z';
|
||||||
const end = '2021-10-10T00:15:00.000Z';
|
const end = '2021-10-10T00:15:00.000Z';
|
|
@ -6,8 +6,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import url from 'url';
|
import url from 'url';
|
||||||
import { synthtrace } from '../../../synthtrace';
|
import { synthtrace } from '../../synthtrace';
|
||||||
import { opbeans } from '../../fixtures/synthtrace/opbeans';
|
import { opbeans } from '../fixtures/synthtrace/opbeans';
|
||||||
|
|
||||||
const start = '2021-10-10T00:00:00.000Z';
|
const start = '2021-10-10T00:00:00.000Z';
|
||||||
const end = '2021-10-10T00:15:00.000Z';
|
const end = '2021-10-10T00:15:00.000Z';
|
|
@ -5,8 +5,8 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
import url from 'url';
|
import url from 'url';
|
||||||
import { synthtrace } from '../../../../synthtrace';
|
import { synthtrace } from '../../../synthtrace';
|
||||||
import { checkA11y } from '../../../support/commands';
|
import { checkA11y } from '../../support/commands';
|
||||||
import { generateData } from './generate_data';
|
import { generateData } from './generate_data';
|
||||||
|
|
||||||
const start = '2021-10-10T00:00:00.000Z';
|
const start = '2021-10-10T00:00:00.000Z';
|
|
@ -6,7 +6,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import url from 'url';
|
import url from 'url';
|
||||||
import { synthtrace } from '../../../../synthtrace';
|
import { synthtrace } from '../../../synthtrace';
|
||||||
import { generateMobileData } from './generate_data';
|
import { generateMobileData } from './generate_data';
|
||||||
|
|
||||||
const start = '2021-10-10T00:00:00.000Z';
|
const start = '2021-10-10T00:00:00.000Z';
|
|
@ -6,7 +6,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import url from 'url';
|
import url from 'url';
|
||||||
import { synthtrace } from '../../../../synthtrace';
|
import { synthtrace } from '../../../synthtrace';
|
||||||
import { generateMobileData } from './generate_data';
|
import { generateMobileData } from './generate_data';
|
||||||
|
|
||||||
const start = '2021-10-10T00:00:00.000Z';
|
const start = '2021-10-10T00:00:00.000Z';
|
|
@ -6,8 +6,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import url from 'url';
|
import url from 'url';
|
||||||
import { synthtrace } from '../../../synthtrace';
|
import { synthtrace } from '../../synthtrace';
|
||||||
import { opbeans } from '../../fixtures/synthtrace/opbeans';
|
import { opbeans } from '../fixtures/synthtrace/opbeans';
|
||||||
|
|
||||||
const start = '2021-10-10T00:00:00.000Z';
|
const start = '2021-10-10T00:00:00.000Z';
|
||||||
const end = '2021-10-10T00:15:00.000Z';
|
const end = '2021-10-10T00:15:00.000Z';
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
import { apm, timerange } from '@kbn/apm-synthtrace-client';
|
import { apm, timerange } from '@kbn/apm-synthtrace-client';
|
||||||
import { synthtrace } from '../../../../synthtrace';
|
import { synthtrace } from '../../../synthtrace';
|
||||||
|
|
||||||
const start = Date.now() - 1000;
|
const start = Date.now() - 1000;
|
||||||
const end = Date.now();
|
const end = Date.now();
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { synthtrace } from '../../../../synthtrace';
|
import { synthtrace } from '../../../synthtrace';
|
||||||
import { generateData } from './generate_data';
|
import { generateData } from './generate_data';
|
||||||
|
|
||||||
function deleteAllRules() {
|
function deleteAllRules() {
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
import url from 'url';
|
import url from 'url';
|
||||||
import { synthtrace } from '../../../../synthtrace';
|
import { synthtrace } from '../../../synthtrace';
|
||||||
import { generateData } from './generate_data';
|
import { generateData } from './generate_data';
|
||||||
|
|
||||||
const start = Date.now() - 1000;
|
const start = Date.now() - 1000;
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
import url from 'url';
|
import url from 'url';
|
||||||
import { synthtrace } from '../../../../../synthtrace';
|
import { synthtrace } from '../../../../synthtrace';
|
||||||
import { generateData } from './generate_data';
|
import { generateData } from './generate_data';
|
||||||
|
|
||||||
const start = '2021-10-10T00:00:00.000Z';
|
const start = '2021-10-10T00:00:00.000Z';
|
|
@ -6,9 +6,9 @@
|
||||||
*/
|
*/
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import url from 'url';
|
import url from 'url';
|
||||||
import { synthtrace } from '../../../../synthtrace';
|
import { synthtrace } from '../../../synthtrace';
|
||||||
import { opbeans } from '../../../fixtures/synthtrace/opbeans';
|
import { opbeans } from '../../fixtures/synthtrace/opbeans';
|
||||||
import { checkA11y } from '../../../support/commands';
|
import { checkA11y } from '../../support/commands';
|
||||||
import { generateMultipleServicesData } from './generate_data';
|
import { generateMultipleServicesData } from './generate_data';
|
||||||
|
|
||||||
const timeRange = {
|
const timeRange = {
|
|
@ -5,8 +5,8 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
import url from 'url';
|
import url from 'url';
|
||||||
import { synthtrace } from '../../../../synthtrace';
|
import { synthtrace } from '../../../synthtrace';
|
||||||
import { opbeans } from '../../../fixtures/synthtrace/opbeans';
|
import { opbeans } from '../../fixtures/synthtrace/opbeans';
|
||||||
|
|
||||||
const start = '2021-10-10T00:00:00.000Z';
|
const start = '2021-10-10T00:00:00.000Z';
|
||||||
const end = '2021-10-10T00:15:00.000Z';
|
const end = '2021-10-10T00:15:00.000Z';
|
|
@ -6,8 +6,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import url from 'url';
|
import url from 'url';
|
||||||
import { synthtrace } from '../../../../synthtrace';
|
import { synthtrace } from '../../../synthtrace';
|
||||||
import { opbeans } from '../../../fixtures/synthtrace/opbeans';
|
import { opbeans } from '../../fixtures/synthtrace/opbeans';
|
||||||
|
|
||||||
const start = '2021-10-10T00:00:00.000Z';
|
const start = '2021-10-10T00:00:00.000Z';
|
||||||
const end = '2021-10-10T00:15:00.000Z';
|
const end = '2021-10-10T00:15:00.000Z';
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
import url from 'url';
|
import url from 'url';
|
||||||
import { synthtrace } from '../../../../../synthtrace';
|
import { synthtrace } from '../../../../synthtrace';
|
||||||
import { generateData } from './generate_data';
|
import { generateData } from './generate_data';
|
||||||
|
|
||||||
const start = '2021-10-10T00:00:00.000Z';
|
const start = '2021-10-10T00:00:00.000Z';
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
import url from 'url';
|
import url from 'url';
|
||||||
import { synthtrace } from '../../../../../synthtrace';
|
import { synthtrace } from '../../../../synthtrace';
|
||||||
import { generateData } from './generate_data';
|
import { generateData } from './generate_data';
|
||||||
|
|
||||||
const start = '2021-10-10T00:00:00.000Z';
|
const start = '2021-10-10T00:00:00.000Z';
|
|
@ -6,8 +6,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import url from 'url';
|
import url from 'url';
|
||||||
import { synthtrace } from '../../../../synthtrace';
|
import { synthtrace } from '../../../synthtrace';
|
||||||
import { opbeans } from '../../../fixtures/synthtrace/opbeans';
|
import { opbeans } from '../../fixtures/synthtrace/opbeans';
|
||||||
|
|
||||||
const start = '2021-10-10T00:00:00.000Z';
|
const start = '2021-10-10T00:00:00.000Z';
|
||||||
const end = '2021-10-10T00:15:00.000Z';
|
const end = '2021-10-10T00:15:00.000Z';
|
|
@ -5,8 +5,8 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
import url from 'url';
|
import url from 'url';
|
||||||
import { synthtrace } from '../../../../synthtrace';
|
import { synthtrace } from '../../../synthtrace';
|
||||||
import { opbeans } from '../../../fixtures/synthtrace/opbeans';
|
import { opbeans } from '../../fixtures/synthtrace/opbeans';
|
||||||
|
|
||||||
const start = '2021-10-10T00:00:00.000Z';
|
const start = '2021-10-10T00:00:00.000Z';
|
||||||
const end = '2021-10-10T00:15:00.000Z';
|
const end = '2021-10-10T00:15:00.000Z';
|
|
@ -6,8 +6,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import url from 'url';
|
import url from 'url';
|
||||||
import { synthtrace } from '../../../../synthtrace';
|
import { synthtrace } from '../../../synthtrace';
|
||||||
import { opbeans } from '../../../fixtures/synthtrace/opbeans';
|
import { opbeans } from '../../fixtures/synthtrace/opbeans';
|
||||||
|
|
||||||
const start = '2021-10-10T00:00:00.000Z';
|
const start = '2021-10-10T00:00:00.000Z';
|
||||||
const end = '2021-10-10T00:15:00.000Z';
|
const end = '2021-10-10T00:15:00.000Z';
|
|
@ -6,7 +6,7 @@
|
||||||
*/
|
*/
|
||||||
import url from 'url';
|
import url from 'url';
|
||||||
import moment from 'moment/moment';
|
import moment from 'moment/moment';
|
||||||
import { synthtrace } from '../../../../synthtrace';
|
import { synthtrace } from '../../../synthtrace';
|
||||||
import { generateMobileData } from './generate_mobile.data';
|
import { generateMobileData } from './generate_mobile.data';
|
||||||
|
|
||||||
const start = Date.now() - 1000;
|
const start = Date.now() - 1000;
|
|
@ -5,7 +5,7 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
import url from 'url';
|
import url from 'url';
|
||||||
import { synthtrace } from '../../../../synthtrace';
|
import { synthtrace } from '../../../synthtrace';
|
||||||
import { generateData } from './generate_data';
|
import { generateData } from './generate_data';
|
||||||
|
|
||||||
const start = Date.now() - 1000;
|
const start = Date.now() - 1000;
|
|
@ -7,9 +7,9 @@
|
||||||
|
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import url from 'url';
|
import url from 'url';
|
||||||
import { synthtrace } from '../../../../synthtrace';
|
import { synthtrace } from '../../../synthtrace';
|
||||||
import { opbeans } from '../../../fixtures/synthtrace/opbeans';
|
import { opbeans } from '../../fixtures/synthtrace/opbeans';
|
||||||
import { checkA11y } from '../../../support/commands';
|
import { checkA11y } from '../../support/commands';
|
||||||
|
|
||||||
const start = '2021-10-10T00:00:00.000Z';
|
const start = '2021-10-10T00:00:00.000Z';
|
||||||
const end = '2021-10-10T00:15:00.000Z';
|
const end = '2021-10-10T00:15:00.000Z';
|
|
@ -6,8 +6,8 @@
|
||||||
*/
|
*/
|
||||||
import url from 'url';
|
import url from 'url';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { synthtrace } from '../../../../synthtrace';
|
import { synthtrace } from '../../../synthtrace';
|
||||||
import { opbeans } from '../../../fixtures/synthtrace/opbeans';
|
import { opbeans } from '../../fixtures/synthtrace/opbeans';
|
||||||
|
|
||||||
const start = '2021-10-10T00:00:00.000Z';
|
const start = '2021-10-10T00:00:00.000Z';
|
||||||
const end = '2021-10-10T00:15:00.000Z';
|
const end = '2021-10-10T00:15:00.000Z';
|
|
@ -6,7 +6,7 @@
|
||||||
*/
|
*/
|
||||||
import { apm, timerange } from '@kbn/apm-synthtrace-client';
|
import { apm, timerange } from '@kbn/apm-synthtrace-client';
|
||||||
import url from 'url';
|
import url from 'url';
|
||||||
import { synthtrace } from '../../../../synthtrace';
|
import { synthtrace } from '../../../synthtrace';
|
||||||
|
|
||||||
const timeRange = {
|
const timeRange = {
|
||||||
rangeFrom: '2021-10-10T00:00:00.000Z',
|
rangeFrom: '2021-10-10T00:00:00.000Z',
|
|
@ -6,9 +6,9 @@
|
||||||
*/
|
*/
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import url from 'url';
|
import url from 'url';
|
||||||
import { synthtrace } from '../../../../synthtrace';
|
import { synthtrace } from '../../../synthtrace';
|
||||||
import { opbeans } from '../../../fixtures/synthtrace/opbeans';
|
import { opbeans } from '../../fixtures/synthtrace/opbeans';
|
||||||
import { checkA11y } from '../../../support/commands';
|
import { checkA11y } from '../../support/commands';
|
||||||
|
|
||||||
const timeRange = {
|
const timeRange = {
|
||||||
rangeFrom: '2021-10-10T00:00:00.000Z',
|
rangeFrom: '2021-10-10T00:00:00.000Z',
|
|
@ -6,8 +6,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import url from 'url';
|
import url from 'url';
|
||||||
import { synthtrace } from '../../../../synthtrace';
|
import { synthtrace } from '../../../synthtrace';
|
||||||
import { opbeans } from '../../../fixtures/synthtrace/opbeans';
|
import { opbeans } from '../../fixtures/synthtrace/opbeans';
|
||||||
|
|
||||||
const start = '2021-10-10T00:00:00.000Z';
|
const start = '2021-10-10T00:00:00.000Z';
|
||||||
const end = '2021-10-10T00:15:00.000Z';
|
const end = '2021-10-10T00:15:00.000Z';
|
|
@ -5,8 +5,8 @@
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
import { apm, timerange } from '@kbn/apm-synthtrace-client';
|
import { apm, timerange } from '@kbn/apm-synthtrace-client';
|
||||||
import { SpanLink } from '../../../../../typings/es_schemas/raw/fields/span_links';
|
import { SpanLink } from '../../../../typings/es_schemas/raw/fields/span_links';
|
||||||
import { synthtrace } from '../../../../synthtrace';
|
import { synthtrace } from '../../../synthtrace';
|
||||||
|
|
||||||
function getProducerInternalOnly() {
|
function getProducerInternalOnly() {
|
||||||
const producerInternalOnlyInstance = apm
|
const producerInternalOnlyInstance = apm
|
|
@ -6,7 +6,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import url from 'url';
|
import url from 'url';
|
||||||
import { synthtrace } from '../../../../synthtrace';
|
import { synthtrace } from '../../../synthtrace';
|
||||||
import { generateSpanLinksData } from './generate_span_links_data';
|
import { generateSpanLinksData } from './generate_span_links_data';
|
||||||
|
|
||||||
const start = '2022-01-01T00:00:00.000Z';
|
const start = '2022-01-01T00:00:00.000Z';
|
|
@ -4,9 +4,9 @@
|
||||||
* 2.0; you may not use this file except in compliance with the Elastic License
|
* 2.0; you may not use this file except in compliance with the Elastic License
|
||||||
* 2.0.
|
* 2.0.
|
||||||
*/
|
*/
|
||||||
import type { APIReturnType } from '../../../../../public/services/rest/create_call_apm_api';
|
import type { APIReturnType } from '../../../../public/services/rest/create_call_apm_api';
|
||||||
import { synthtrace } from '../../../../synthtrace';
|
import { synthtrace } from '../../../synthtrace';
|
||||||
import { opbeans } from '../../../fixtures/synthtrace/opbeans';
|
import { opbeans } from '../../fixtures/synthtrace/opbeans';
|
||||||
|
|
||||||
const start = '2021-10-10T00:00:00.000Z';
|
const start = '2021-10-10T00:00:00.000Z';
|
||||||
const end = '2021-10-10T00:15:00.000Z';
|
const end = '2021-10-10T00:15:00.000Z';
|
|
@ -6,9 +6,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import url from 'url';
|
import url from 'url';
|
||||||
import { synthtrace } from '../../../../synthtrace';
|
import { synthtrace } from '../../../synthtrace';
|
||||||
import { opbeans } from '../../../fixtures/synthtrace/opbeans';
|
import { opbeans } from '../../fixtures/synthtrace/opbeans';
|
||||||
import { checkA11y } from '../../../support/commands';
|
import { checkA11y } from '../../support/commands';
|
||||||
|
|
||||||
const start = '2021-10-10T00:00:00.000Z';
|
const start = '2021-10-10T00:00:00.000Z';
|
||||||
const end = '2021-10-10T00:15:00.000Z';
|
const end = '2021-10-10T00:15:00.000Z';
|
|
@ -1,40 +0,0 @@
|
||||||
/*
|
|
||||||
* 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 path from 'path';
|
|
||||||
import { execSync } from 'child_process';
|
|
||||||
|
|
||||||
const ES_ARCHIVE_DIR = path.resolve(
|
|
||||||
__dirname,
|
|
||||||
'../../cypress/fixtures/es_archiver'
|
|
||||||
);
|
|
||||||
|
|
||||||
// Otherwise execSync would inject NODE_TLS_REJECT_UNAUTHORIZED=0 and node would abort if used over https
|
|
||||||
const NODE_TLS_REJECT_UNAUTHORIZED = '1';
|
|
||||||
|
|
||||||
export const esArchiverLoad = (archiveName: string) => {
|
|
||||||
const archivePath = path.join(ES_ARCHIVE_DIR, archiveName);
|
|
||||||
execSync(
|
|
||||||
`node ../../../../scripts/es_archiver load "${archivePath}" --config ../../../test/functional/config.base.js`,
|
|
||||||
{ env: { ...process.env, NODE_TLS_REJECT_UNAUTHORIZED }, stdio: 'inherit' }
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export const esArchiverUnload = (archiveName: string) => {
|
|
||||||
const archivePath = path.join(ES_ARCHIVE_DIR, archiveName);
|
|
||||||
execSync(
|
|
||||||
`node ../../../../scripts/es_archiver unload "${archivePath}" --config ../../../test/functional/config.base.js`,
|
|
||||||
{ env: { ...process.env, NODE_TLS_REJECT_UNAUTHORIZED }, stdio: 'inherit' }
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export const esArchiverResetKibana = () => {
|
|
||||||
execSync(
|
|
||||||
`node ../../../../scripts/es_archiver empty-kibana-index --config ../../../test/functional/config.base.js`,
|
|
||||||
{ env: { ...process.env, NODE_TLS_REJECT_UNAUTHORIZED }, stdio: 'inherit' }
|
|
||||||
);
|
|
||||||
};
|
|
Loading…
Add table
Add a link
Reference in a new issue