Skip to content
Merged
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
24 changes: 12 additions & 12 deletions .buildkite/ftr_oblt_serverless_configs.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
disabled:
# Base config files, only necessary to inform config finding script
- x-pack/test_serverless/functional/test_suites/observability/cypress/oblt_config.base.ts
- x-pack/solutions/observability/test/serverless/functional/test_suites/cypress/oblt_config.base.ts
- x-pack/platform/test/serverless/functional/config.oblt.base.ts
- x-pack/platform/test/serverless/functional/config.logs_essentials.base.ts

# Cypress configs, for now these are still run manually
- x-pack/test_serverless/functional/test_suites/observability/cypress/config_headless.ts
- x-pack/test_serverless/functional/test_suites/observability/cypress/config_runner.ts
- x-pack/solutions/observability/test/serverless/functional/test_suites/cypress/config_headless.ts
- x-pack/solutions/observability/test/serverless/functional/test_suites/cypress/config_runner.ts

# Observability AI Assistant local-only tests
- x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.ai_assistant_local.serverless.config.ts

defaultQueue: 'n2-4-spot'
enabled:
- x-pack/test_serverless/api_integration/test_suites/observability/config.ts
- x-pack/test_serverless/api_integration/test_suites/observability/config.logs_essentials.ts
- x-pack/test_serverless/api_integration/test_suites/observability/config.feature_flags.ts
- x-pack/solutions/observability/test/serverless/api_integration/configs/config.ts
- x-pack/solutions/observability/test/serverless/api_integration/configs/config.logs_essentials.ts
- x-pack/solutions/observability/test/serverless/api_integration/configs/config.feature_flags.ts
- x-pack/platform/test/serverless/api_integration/configs/observability/config.group1.ts
- x-pack/platform/test/serverless/api_integration/configs/observability/config.logs_essentials.group1.ts
- x-pack/test_serverless/api_integration/test_suites/observability/fleet/config.ts
- x-pack/test_serverless/functional/test_suites/observability/config.ts
- x-pack/test_serverless/functional/test_suites/observability/config.logs_essentials.ts
- x-pack/solutions/observability/test/serverless/api_integration/test_suites/fleet/config.ts
- x-pack/solutions/observability/test/serverless/functional/configs/config.ts
- x-pack/solutions/observability/test/serverless/functional/configs/config.logs_essentials.ts
- x-pack/platform/test/serverless/functional/configs/observability/config.examples.ts
- x-pack/test_serverless/functional/test_suites/observability/config.feature_flags.ts
- x-pack/solutions/observability/test/serverless/functional/configs/config.feature_flags.ts
- x-pack/platform/test/serverless/functional/configs/observability/config.saved_objects_management.ts
- x-pack/platform/test/serverless/functional/configs/observability/config.context_awareness.ts
- x-pack/platform/test/serverless/functional/configs/observability/config.config_compat_mode.ts
Expand All @@ -39,8 +39,8 @@ enabled:
- x-pack/platform/test/serverless/functional/configs/observability/config.group11.ts
- x-pack/platform/test/serverless/functional/configs/observability/config.group12.ts
- x-pack/platform/test/serverless/functional/configs/observability/config.logs_essentials.group1.ts
- x-pack/test_serverless/functional/test_suites/observability/config.screenshots.ts
- x-pack/test_serverless/functional/test_suites/observability/config.telemetry.ts
- x-pack/solutions/observability/test/serverless/functional/configs/config.screenshots.ts
- x-pack/solutions/observability/test/serverless/functional/configs/config.telemetry.ts
# serverless config files that run deployment-agnostic tests
- x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.serverless.config.ts
- x-pack/solutions/observability/test/api_integration_deployment_agnostic/configs/serverless/oblt.ai_assistant.serverless.config.ts
Expand Down
67 changes: 36 additions & 31 deletions .github/CODEOWNERS

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions x-pack/platform/plugins/shared/dataset_quality/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,17 +117,17 @@ yarn test:ftr:runner --config ./x-pack/solutions/observability/test/functional/a
##### Server

```
yarn test:ftr:server --config ./x-pack/test_serverless/functional/test_suites/observability/config.ts
yarn test:ftr:server --config ./x-pack/solutions/observability/test/serverless/functional/configs/config.ts
```

##### Runner

```
yarn test:ftr:runner --config ./x-pack/test_serverless/functional/test_suites/observability/config.ts --include ./x-pack/test_serverless/functional/test_suites/observability/dataset_quality/index.ts
yarn test:ftr:runner --config ./x-pack/solutions/observability/test/serverless/functional/configs/config.ts --include ./x-pack/solutions/observability/test/serverless/functional/test_suites/dataset_quality/index.ts
```

##### Running Individual Tests

```
yarn test:ftr:runner --config ./x-pack/test_serverless/functional/test_suites/observability/config.ts --include ./x-pack/test_serverless/functional/test_suites/observability/dataset_quality/$1
yarn test:ftr:runner --config ./x-pack/solutions/observability/test/serverless/functional/configs/config.ts --include ./x-pack/solutions/observability/test/serverless/functional/test_suites/dataset_quality/$1
```
4 changes: 2 additions & 2 deletions x-pack/platform/plugins/shared/fleet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ FLEET_PACKAGE_REGISTRY_PORT=12345 yarn test:ftr:runner --config x-pack/test_ser
Observability:

```sh
FLEET_PACKAGE_REGISTRY_PORT=12345 yarn test:ftr:server --config x-pack/test_serverless/api_integration/test_suites/observability/fleet/config.ts
FLEET_PACKAGE_REGISTRY_PORT=12345 yarn test:ftr:runner --config x-pack/test_serverless/api_integration/test_suites/observability/fleet/config.ts
FLEET_PACKAGE_REGISTRY_PORT=12345 yarn test:ftr:server --config x-pack/solutions/observability/test/serverless/api_integration/test_suites/fleet/config.ts
FLEET_PACKAGE_REGISTRY_PORT=12345 yarn test:ftr:runner --config x-pack/solutions/observability/test/serverless/api_integration/test_suites/fleet/config.ts
```

#### Cypress tests
Expand Down
80 changes: 80 additions & 0 deletions x-pack/platform/test/serverless/shared/lib/cases/helpers.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/*
* 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 { SECURITY_SOLUTION_OWNER } from '@kbn/cases-plugin/common';
import { AppDeepLinkId } from '@kbn/core-chrome-browser';
import { FtrProviderContext } from '../../../functional/ftr_provider_context';

export const createOneCaseBeforeDeleteAllAfter = (
getPageObject: FtrProviderContext['getPageObject'],
getService: FtrProviderContext['getService'],
owner: string
) => {
const svlCases = getService('svlCases');

before(async () => {
await createAndNavigateToCase(getPageObject, getService, owner);
});

after(async () => {
await svlCases.api.deleteAllCaseItems();
});
};

export const createOneCaseBeforeEachDeleteAllAfterEach = (
getPageObject: FtrProviderContext['getPageObject'],
getService: FtrProviderContext['getService'],
owner: string
) => {
const svlCases = getService('svlCases');

beforeEach(async () => {
await createAndNavigateToCase(getPageObject, getService, owner);
});

afterEach(async () => {
await svlCases.api.deleteAllCaseItems();
});
};

export const createAndNavigateToCase = async (
getPageObject: FtrProviderContext['getPageObject'],
getService: FtrProviderContext['getService'],
owner: string
) => {
const cases = getService('cases');

const header = getPageObject('header');

await navigateToCasesApp(getPageObject, getService, owner);

const theCase = await cases.api.createCase({ owner });
await cases.casesTable.waitForCasesToBeListed();
await cases.casesTable.goToFirstListedCase();
await header.waitUntilLoadingHasFinished();

return theCase;
};

export const navigateToCasesApp = async (
getPageObject: FtrProviderContext['getPageObject'],
getService: FtrProviderContext['getService'],
owner: string
) => {
const common = getPageObject('common');
const svlCommonNavigation = getPageObject('svlCommonNavigation');

await common.navigateToApp('landingPage');

if (owner === SECURITY_SOLUTION_OWNER) {
await svlCommonNavigation.sidenav.clickLink({
deepLinkId: 'securitySolutionUI:cases' as AppDeepLinkId,
});
} else {
await svlCommonNavigation.sidenav.clickLink({ deepLinkId: 'observability-overview:cases' });
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
* 2.0.
*/

export { expectToReject } from './expect_to_reject';
export * from './helpers';
1 change: 1 addition & 0 deletions x-pack/platform/test/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@
"@kbn/console-plugin",
"@kbn/serverless-common-settings",
"@kbn/core-saved-objects-import-export-server-internal",
"@kbn/core-chrome-browser",
"@kbn/licensing-types",
"@kbn/product-intercept-plugin",
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,17 +190,17 @@ diff --git a/x-pack/solutions/observability/plugins/apm/scripts/test/README.md b
#### Start server and run tests (single process)

```
node scripts/functional_tests.js --config x-pack/test_serverless/api_integration/test_suites/observability/config.ts
node scripts/functional_tests.js --config x-pack/solutions/observability/test/serverless/api_integration/configs/config.ts
```

#### Start server and run tests (separate processes)

```sh
# Start server
node scripts/functional_tests_server.js --config x-pack/test_serverless/api_integration/test_suites/observability/config.ts
node scripts/functional_tests_server.js --config x-pack/solutions/observability/test/serverless/api_integration/configs/config.ts

# Run tests
node scripts/functional_test_runner --config=x-pack/test_serverless/api_integration/test_suites/observability/config.ts
node scripts/functional_test_runner --config=x-pack/solutions/observability/test/serverless/api_integration/configs/config.ts
```

## Storybook
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,41 @@ This plugin provides an app based on the `LogsExplorer` component from the `logs
### Stateful

#### FTR Server

```
yarn test:ftr:server --config ./x-pack/test/functional/apps/observability_logs_explorer/config.ts
```

#### FTR Runner

```
yarn test:ftr:runner --config ./x-pack/test/functional/apps/observability_logs_explorer/config.ts --include ./x-pack/test/functional/apps/observability_logs_explorer/index.ts
```

#### Running Individual Tests

```
yarn test:ftr:runner --config ./x-pack/test/functional/apps/observability_logs_explorer/config.ts --include ./x-pack/test/functional/apps/observability_logs_explorer/$1
```

### Serverless

#### Server

```
yarn test:ftr:server --config ./x-pack/test_serverless/functional/test_suites/observability/config.ts
yarn test:ftr:server --config ./x-pack/solutions/observability/test/serverless/functional/configs/config.ts
```

#### Runner

```
yarn test:ftr:runner --config ./x-pack/test_serverless/functional/test_suites/observability/config.ts --include ./x-pack/test_serverless/functional/test_suites/observability/observability_logs_explorer/index.ts
yarn test:ftr:runner --config ./x-pack/solutions/observability/test/serverless/functional/configs/config.ts --include ./x-pack/solutions/observability/test/serverless/functional/test_suites/observability_logs_explorer/index.ts
```

#### Running Individual Tests

```
yarn test:ftr:runner --config ./x-pack/test_serverless/functional/test_suites/observability/config.ts --include ./x-pack/test_serverless/functional/test_suites/observability/observability_logs_explorer/$1
yarn test:ftr:runner --config ./x-pack/solutions/observability/test/serverless/functional/configs/config.ts --include ./x-pack/solutions/observability/test/serverless/functional/test_suites/observability_logs_explorer/$1
```

### Using dockerized package registry
Expand All @@ -50,28 +57,33 @@ export set FLEET_PACKAGE_REGISTRY_PORT=12345
To unset the variable, and run the tests against the real endpoint again, execute

```
unset FLEET_PACKAGE_REGISTRY_PORT
unset FLEET_PACKAGE_REGISTRY_PORT
```

## Checktypes

#### Logs explorer

```
node scripts/type_check.js --project x-pack/solutions/observability/plugins/logs_explorer/tsconfig.json
```

#### Observability Logs explorer

```
node scripts/type_check.js --project x-pack/solutions/observability/plugins/observability_logs_explorer/tsconfig.json
```

### Generating Data using Synthtrace

#### Logs Data only

```
node scripts/synthtrace simple_logs.ts --clean [--live]
```

#### Logs and Metrics Data

```
node scripts/synthtrace logs_and_metrics.ts --clean [--live]
```
Expand All @@ -84,4 +96,4 @@ The limit is done to protect us in case we add some dependency that heavily impa

```
node scripts/build_kibana_platform_plugins --focus logsExplorer --update-limits
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,16 @@ yarn test:ftr:runner --config ./x-pack/solutions/observability/test/observabilit

```sh
# start server
yarn test:ftr:server --config ./x-pack/test_serverless/functional/test_suites/observability/config.ts
yarn test:ftr:server --config ./x-pack/solutions/observability/test/serverless/functional/configs/config.ts

# run tests
yarn test:ftr:runner --config ./x-pack/test_serverless/functional/test_suites/observability/config.ts --include ./x-pack/test_serverless/functional/test_suites/observability/onboarding/index.ts
yarn test:ftr:runner --config ./x-pack/solutions/observability/test/serverless/functional/configs/config.ts --include ./x-pack/solutions/observability/test/serverless/functional/test_suites/onboarding/index.ts
```

##### Running Individual Tests

```sh
yarn test:ftr:runner --config ./x-pack/test_serverless/functional/test_suites/observability/config.ts --include ./x-pack/test_serverless/functional/test_suites/observability/onboarding/index.ts/$1
yarn test:ftr:runner --config ./x-pack/solutions/observability/test/serverless/functional/configs/config.ts --include ./x-pack/solutions/observability/test/serverless/functional/test_suites/onboarding/index.ts/$1
```

### Playwright tests (Scout)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* 2.0.
*/

import { createTestConfig } from '../../config.base';
import { services } from './apm_api_integration/common/services';
import { createTestConfig } from '@kbn/test-suites-xpack-platform/serverless/api_integration/config.base';
import { services } from '../test_suites/apm_api_integration/common/services';

/**
* Make sure to create a MKI deployment with custom Kibana image, that includes feature flags arguments
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
* 2.0.
*/
import { KBN_CERT_PATH, KBN_KEY_PATH } from '@kbn/dev-utils';
import { createTestConfig } from '../../config.base';
import { services as apmServices } from './apm_api_integration/common/services';
import { services as datasetQualityServices } from './dataset_quality_api_integration/common/services';
import { createTestConfig } from '@kbn/test-suites-xpack-platform/serverless/api_integration/config.base';
import { services as apmServices } from '../test_suites/apm_api_integration/common/services';
import { services as datasetQualityServices } from '../test_suites/dataset_quality_api_integration/common/services';

export default createTestConfig({
serverlessProject: 'oblt',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
* 2.0.
*/
import { KBN_CERT_PATH, KBN_KEY_PATH } from '@kbn/dev-utils';
import { createTestConfig } from '../../config.base';
import { services as apmServices } from './apm_api_integration/common/services';
import { services as datasetQualityServices } from './dataset_quality_api_integration/common/services';
import { createTestConfig } from '@kbn/test-suites-xpack-platform/serverless/api_integration/config.base';
import { services as apmServices } from '../test_suites/apm_api_integration/common/services';
import { services as datasetQualityServices } from '../test_suites/dataset_quality_api_integration/common/services';

export default createTestConfig({
serverlessProject: 'oblt',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import { FtrProviderContext } from '../../ftr_provider_context';
import { FtrProviderContext } from '../ftr_provider_context';

export default function ({ loadTestFile }: FtrProviderContext) {
describe('Serverless observability API - feature flags', function () {});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
* 2.0.
*/

import { FtrProviderContext } from '../../ftr_provider_context';
import { FtrProviderContext } from '../ftr_provider_context';

export default function ({ loadTestFile }: FtrProviderContext) {
describe('Serverless observability logs essentials API', function () {
this.tags(['esGate']);

loadTestFile(require.resolve('./logs_essentials_only'));
loadTestFile(require.resolve('../test_suites/logs_essentials_only'));
});
}
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 { FtrProviderContext } from '../ftr_provider_context';

export default function ({ loadTestFile }: FtrProviderContext) {
describe('Serverless observability API', function () {
this.tags(['esGate']);

loadTestFile(require.resolve('../test_suites/apm_api_integration/feature_flags.ts'));
loadTestFile(require.resolve('../test_suites/cases'));
loadTestFile(require.resolve('../test_suites/synthetics'));
loadTestFile(require.resolve('../test_suites/dataset_quality_api_integration'));
loadTestFile(require.resolve('../test_suites/platform_security'));
});
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* 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 { GenericFtrProviderContext } from '@kbn/test';

import { services } from './services';

export type FtrProviderContext = GenericFtrProviderContext<typeof services, {}>;
Loading
Loading