Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Discover] Add context awareness telemetry tests for Observability profiles #201310

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
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
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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tonyghiani I noticed this wasn't updated when we added the observability folder but I figure it makes sense to share ownership here.


# Platform Docs
/x-pack/test_serverless/functional/test_suites/security/screenshot_creation/index.ts @elastic/platform-docs
Expand Down
6 changes: 4 additions & 2 deletions x-pack/test_serverless/functional/config.base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,17 @@ import { pageObjects } from './page_objects';
import { services } from './services';
import type { CreateTestConfigOptions } from '../shared/types';

export function createTestConfig(options: CreateTestConfigOptions) {
export function createTestConfig<TServices extends {} = typeof services>(
options: CreateTestConfigOptions<TServices>
) {
return async ({ readConfigFile }: FtrConfigProviderContext) => {
const svlSharedConfig = await readConfigFile(require.resolve('../shared/config.base.ts'));

return {
...svlSharedConfig.getAll(),

pageObjects,
services,
services: { ...services, ...options.services },
esTestCluster: {
...svlSharedConfig.get('esTestCluster'),
serverArgs: [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/*
* 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 type { GenericFtrProviderContext } from '@kbn/test';
import {
KibanaEBTUIProvider,
KibanaEBTServerProvider,
} from '@kbn/test-suites-src/analytics/services/kibana_ebt';
import { services as inheritedServices } from '../../services';
import { pageObjects } from '../../page_objects';
import { createTestConfig } from '../../config.base';

type ObservabilityTelemetryServices = typeof inheritedServices & {
kibana_ebt_server: typeof KibanaEBTServerProvider;
kibana_ebt_ui: typeof KibanaEBTUIProvider;
};

const services: ObservabilityTelemetryServices = {
...inheritedServices,
kibana_ebt_server: KibanaEBTServerProvider,
kibana_ebt_ui: KibanaEBTUIProvider,
};

export type ObservabilityTelemetryFtrProviderContext = GenericFtrProviderContext<
ObservabilityTelemetryServices,
typeof pageObjects
>;

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

// 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'
)}`,
],
});
Loading