Skip to content

Commit

Permalink
Add dedicated telemetry config that is skipped in MKI
Browse files Browse the repository at this point in the history
  • Loading branch information
davismcphee committed Nov 25, 2024
1 parent c81afdb commit 67a5954
Show file tree
Hide file tree
Showing 8 changed files with 85 additions and 6 deletions.
1 change: 1 addition & 0 deletions .buildkite/ftr_oblt_serverless_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ enabled:
- x-pack/test_serverless/functional/test_suites/observability/common_configs/config.group5.ts
- x-pack/test_serverless/functional/test_suites/observability/common_configs/config.group6.ts
- x-pack/test_serverless/functional/test_suites/observability/config.screenshots.ts
- x-pack/test_serverless/functional/test_suites/observability/config.telemetry.ts
# serverless config files that run deployment-agnostic tests
- x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts
- x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.apm.serverless.config.ts
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -1131,6 +1131,7 @@ x-pack/test_serverless/api_integration/test_suites/common/platform_security @ela
/x-pack/test_serverless/functional/test_suites/common/examples/unified_field_list_examples @elastic/kibana-data-discovery
/x-pack/test_serverless/functional/test_suites/common/management/data_views @elastic/kibana-data-discovery
src/plugins/discover/public/context_awareness/profile_providers/security @elastic/kibana-data-discovery @elastic/security-threat-hunting-investigations
src/plugins/discover/public/context_awareness/profile_providers/observability @elastic/kibana-data-discovery @elastic/obs-ux-logs-team

# Platform Docs
/x-pack/test_serverless/functional/test_suites/security/screenshot_creation/index.ts @elastic/platform-docs
Expand Down
4 changes: 0 additions & 4 deletions x-pack/test_serverless/functional/config.base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ export function createTestConfig(options: CreateTestConfigOptions) {
`--xpack.trigger_actions_ui.enableExperimental=${JSON.stringify([
'isUsingRuleCreateFlyout',
])}`,
`--plugin-path=${resolve(
__dirname,
'../../../test/analytics/plugins/analytics_ftr_helpers'
)}`,
...(options.kbnServerArgs ?? []),
],
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* 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 { resolve } from 'path';
import { createTestConfig } from '../../config.base';

export default createTestConfig({
serverlessProject: 'oblt',
testFiles: [require.resolve('./index.telemetry.ts')],
junit: {
reportName: 'Serverless Observability Telemetry Functional Tests',
},
suiteTags: { exclude: ['skipSvlOblt'] },

// include settings from project controller
// https://github.com/elastic/project-controller/blob/main/internal/project/observability/config/elasticsearch.yml
esServerArgs: ['xpack.ml.dfa.enabled=false'],
kbnServerArgs: [
`--plugin-path=${resolve(
__dirname,
'../../../../../test/analytics/plugins/analytics_ftr_helpers'
)}`,
],
});
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,5 @@ export default function ({ getService, getPageObjects, loadTestFile }: FtrProvid
loadTestFile(require.resolve('./_get_doc_viewer'));
loadTestFile(require.resolve('./_get_cell_renderers'));
loadTestFile(require.resolve('./_get_app_menu'));
loadTestFile(require.resolve('./_telemetry'));
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import expect from '@kbn/expect';
import type { FtrProviderContext } from '../../../../ftr_provider_context';
import type { FtrProviderContext } from '../../../../../ftr_provider_context';

export default function ({ getService, getPageObjects }: FtrProviderContext) {
const { common, discover, unifiedFieldList, dashboard, header, timePicker, svlCommonPage } =
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* 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 type { FtrProviderContext } from '../../../../../ftr_provider_context';

export default function ({ getService, getPageObjects, loadTestFile }: FtrProviderContext) {
const esArchiver = getService('esArchiver');
const kibanaServer = getService('kibanaServer');
const PageObjects = getPageObjects(['timePicker', 'svlCommonPage']);
const from = '2024-06-10T14:00:00.000Z';
const to = '2024-06-10T16:30:00.000Z';

describe('discover/observabilitySolution/context_awareness/telemetry', function () {
before(async () => {
await esArchiver.load('test/functional/fixtures/es_archiver/discover/context_awareness');
await kibanaServer.importExport.load(
'test/functional/fixtures/kbn_archiver/discover/context_awareness'
);
await kibanaServer.uiSettings.update({
'timepicker:timeDefaults': `{ "from": "${from}", "to": "${to}"}`,
});
});

after(async () => {
await esArchiver.unload('test/functional/fixtures/es_archiver/discover/context_awareness');
await kibanaServer.importExport.unload(
'test/functional/fixtures/kbn_archiver/discover/context_awareness'
);
await PageObjects.timePicker.resetDefaultAbsoluteRangeViaUiSettings();
});

loadTestFile(require.resolve('./_telemetry'));
});
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* 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 { FtrProviderContext } from '../../ftr_provider_context';

export default function ({ loadTestFile }: FtrProviderContext) {
describe('serverless observability UI - telemetry', function () {
this.tags(['skipMKI', 'esGate']);

loadTestFile(require.resolve('./discover/context_awareness/telemetry'));
});
}

0 comments on commit 67a5954

Please sign in to comment.