forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FTR] Serverless - enable common config grouping (elastic#167172)
## Summary This PR introduces grouped common configs in serverless project FTR tests. ### Details * With increasing number of added tests, we're running into issues with test run time (configurations are stopped at 40 minutes) * This PR moves the inclusion of `common` tests from the projects' main `config.ts` file to `common_configs/config.group1.ts`, which can easily be extended * As part of that, `common` tests in `api_integration/test_suites` and `functional/test_suites` are re-organized to no longer contain a top level index file * Created sub-directories and index files where needed * This makes it easier to group `common` tests when including them in project config files ### Additional changes * Add README files to `x-pack/test_serverless/[api_integration|functional]/test_suites/common` * Rename `security` directory in `common` tests to `platform_security` to avoid confusion with the `security` project type * Include sample data test suite in an index file (this suite wasn't included so far and didn't run at all) and prepared it for actually working in serverless * it's still failing and should be fixed soon - skipped it for now
- Loading branch information
Showing
58 changed files
with
477 additions
and
219 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
x-pack/test_serverless/api_integration/test_suites/common/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Kibana Serverless Common API Integration Tests | ||
|
||
The `common` tests in this directory are not project specific and are running | ||
in two or three of the projects. You can use tags to exclude one of the | ||
projects: `skipSvlOblt`, `skipSvlSearch`, `skipSvlSec`. If no such tag is added, | ||
the test will run in all three projects. | ||
Tests that are designed to only run in one of the projects should be added to | ||
the project specific test directory and not to `common` with two skips. | ||
|
||
For more information about serverless tests please refer to | ||
[x-pack/test_serverless/README](https://github.com/elastic/kibana/blob/main/x-pack/test_serverless/README.md). | ||
|
||
## Organizing common tests | ||
|
||
- Common tests don't have dedicated config files as they run as part of project | ||
configs. | ||
- There's no top level index file and tests are organized in sub-directories in | ||
order to better group them based on test run time. | ||
- **If you add a new `common` sub-directory, remember to add it to the `common_configs` of all projects (`x-pack/test_serverless/api_integration/test_suites/[observability|search|security]/common_configs`)** | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
x-pack/test_serverless/api_integration/test_suites/common/elasticsearch_api/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* | ||
* 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 ({ loadTestFile }: FtrProviderContext) { | ||
describe('Elasticsearch API', () => { | ||
loadTestFile(require.resolve('./home')); | ||
}); | ||
} |
39 changes: 0 additions & 39 deletions
39
x-pack/test_serverless/api_integration/test_suites/common/index.ts
This file was deleted.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
x-pack/test_serverless/api_integration/test_suites/common/management/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 type { FtrProviderContext } from '../../../ftr_provider_context'; | ||
|
||
export default function ({ loadTestFile }: FtrProviderContext) { | ||
describe('Management', () => { | ||
loadTestFile(require.resolve('./ingest_pipelines')); | ||
loadTestFile(require.resolve('./rollups')); | ||
loadTestFile(require.resolve('./scripted_fields')); | ||
loadTestFile(require.resolve('./spaces')); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
x-pack/test_serverless/api_integration/test_suites/common/platform_security/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* 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 common API', function () { | ||
loadTestFile(require.resolve('./anonymous')); | ||
loadTestFile(require.resolve('./api_keys')); | ||
loadTestFile(require.resolve('./authentication')); | ||
loadTestFile(require.resolve('./authentication_http')); | ||
loadTestFile(require.resolve('./authorization')); | ||
loadTestFile(require.resolve('./encrypted_saved_objects')); | ||
loadTestFile(require.resolve('./misc')); | ||
loadTestFile(require.resolve('./response_headers')); | ||
loadTestFile(require.resolve('./role_mappings')); | ||
loadTestFile(require.resolve('./sessions')); | ||
loadTestFile(require.resolve('./users')); | ||
loadTestFile(require.resolve('./user_profiles')); | ||
loadTestFile(require.resolve('./views')); | ||
}); | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
32 changes: 32 additions & 0 deletions
32
...test_serverless/api_integration/test_suites/observability/common_configs/config.group1.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* 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 { FtrConfigProviderContext } from '@kbn/test'; | ||
|
||
export default async function ({ readConfigFile }: FtrConfigProviderContext) { | ||
const baseTestConfig = await readConfigFile(require.resolve('../config.ts')); | ||
|
||
return { | ||
...baseTestConfig.getAll(), | ||
testFiles: [ | ||
require.resolve('../../common/alerting'), | ||
require.resolve('../../common/data_view_field_editor'), | ||
require.resolve('../../common/data_views'), | ||
require.resolve('../../common/elasticsearch_api'), | ||
require.resolve('../../common/index_management'), | ||
require.resolve('../../common/kql_telemetry'), | ||
require.resolve('../../common/management'), | ||
require.resolve('../../common/platform_security'), | ||
require.resolve('../../common/scripts_tests'), | ||
require.resolve('../../common/search_oss'), | ||
require.resolve('../../common/search_xpack'), | ||
], | ||
junit: { | ||
reportName: 'Serverless Observability API Integration Tests - Common Group 1', | ||
}, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
x-pack/test_serverless/api_integration/test_suites/search/common_configs/config.group1.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* 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 { FtrConfigProviderContext } from '@kbn/test'; | ||
|
||
export default async function ({ readConfigFile }: FtrConfigProviderContext) { | ||
const baseTestConfig = await readConfigFile(require.resolve('../config.ts')); | ||
|
||
return { | ||
...baseTestConfig.getAll(), | ||
testFiles: [ | ||
require.resolve('../../common/alerting'), | ||
require.resolve('../../common/data_view_field_editor'), | ||
require.resolve('../../common/data_views'), | ||
require.resolve('../../common/elasticsearch_api'), | ||
require.resolve('../../common/index_management'), | ||
require.resolve('../../common/kql_telemetry'), | ||
require.resolve('../../common/management'), | ||
require.resolve('../../common/platform_security'), | ||
require.resolve('../../common/scripts_tests'), | ||
require.resolve('../../common/search_oss'), | ||
require.resolve('../../common/search_xpack'), | ||
], | ||
junit: { | ||
reportName: 'Serverless Search API Integration Tests - Common Group 1', | ||
}, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
x-pack/test_serverless/api_integration/test_suites/security/common_configs/config.group1.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* 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 { FtrConfigProviderContext } from '@kbn/test'; | ||
|
||
export default async function ({ readConfigFile }: FtrConfigProviderContext) { | ||
const baseTestConfig = await readConfigFile(require.resolve('../config.ts')); | ||
|
||
return { | ||
...baseTestConfig.getAll(), | ||
testFiles: [ | ||
require.resolve('../../common/alerting'), | ||
require.resolve('../../common/data_view_field_editor'), | ||
require.resolve('../../common/data_views'), | ||
require.resolve('../../common/elasticsearch_api'), | ||
require.resolve('../../common/index_management'), | ||
require.resolve('../../common/kql_telemetry'), | ||
require.resolve('../../common/management'), | ||
require.resolve('../../common/platform_security'), | ||
require.resolve('../../common/scripts_tests'), | ||
require.resolve('../../common/search_oss'), | ||
require.resolve('../../common/search_xpack'), | ||
], | ||
junit: { | ||
reportName: 'Serverless Security API Integration Tests - Common Group 1', | ||
}, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
x-pack/test_serverless/functional/test_suites/common/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Kibana Serverless Common Functional Tests | ||
|
||
The `common` tests in this directory are not project specific and are running | ||
in two or three of the projects. You can use tags to exclude one of the | ||
projects: `skipSvlOblt`, `skipSvlSearch`, `skipSvlSec`. If no such tag is added, | ||
the test will run in all three projects. | ||
Tests that are designed to only run in one of the projects should be added to | ||
the project specific test directory and not to `common` with two skips. | ||
|
||
For more information about serverless tests please refer to | ||
[x-pack/test_serverless/README](https://github.com/elastic/kibana/blob/main/x-pack/test_serverless/README.md). | ||
|
||
## Organizing common tests | ||
|
||
- Common tests don't have dedicated config files as they run as part of project | ||
configs. | ||
- There's no top level index file and tests are organized in sub-directories in | ||
order to better group them based on test run time. | ||
- **If you add a new `common` sub-directory, remember to add it to the `common_configs` of all projects (`x-pack/test_serverless/functional/test_suites/[observability|search|security]/common_configs`)** | ||
|
||
|
||
|
||
|
||
|
21 changes: 21 additions & 0 deletions
21
x-pack/test_serverless/functional/test_suites/common/examples/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
* 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 Common UI - Examples', function () { | ||
this.tags('skipMKI'); | ||
loadTestFile(require.resolve('./data_view_field_editor_example')); | ||
loadTestFile(require.resolve('./discover_customization_examples')); | ||
loadTestFile(require.resolve('./field_formats')); | ||
loadTestFile(require.resolve('./partial_results')); | ||
loadTestFile(require.resolve('./search')); | ||
loadTestFile(require.resolve('./search_examples')); | ||
loadTestFile(require.resolve('./unified_field_list_examples')); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.