[FTR] Add serverless ES project controller settings (#167299)

## Summary

This PR adds the project controller settings for serverless
Elasticsearch to the Kibana serverless FTR configs. This gets our local
setup closer to what we have in MKI.


### Details

Project controller settings for ES per project:
*
[Observability](https://github.com/elastic/project-controller/blob/main/internal/project/observability/config/elasticsearch.yml)
*
[Search](https://github.com/elastic/project-controller/blob/main/internal/project/esproject/config/elasticsearch.yml)
*
[Security](https://github.com/elastic/project-controller/blob/main/internal/project/security/config/elasticsearch.yml)
This commit is contained in:
Robert Oskamp 2023-09-29 12:12:46 +02:00 committed by GitHub
parent 7fa04e92bc
commit cb48dd2d8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 79 additions and 0 deletions

View file

@ -20,6 +20,13 @@ export function createTestConfig(options: CreateTestConfigOptions) {
...services, ...services,
...options.services, ...options.services,
}, },
esTestCluster: {
...svlSharedConfig.get('esTestCluster'),
serverArgs: [
...svlSharedConfig.get('esTestCluster.serverArgs'),
...(options.esServerArgs ?? []),
],
},
kbnTestServer: { kbnTestServer: {
...svlSharedConfig.get('kbnTestServer'), ...svlSharedConfig.get('kbnTestServer'),
serverArgs: [ serverArgs: [

View file

@ -23,4 +23,8 @@ export default createTestConfig({
kbnServerArgs: ['--xpack.observability.unsafe.thresholdRule.enabled=true'], kbnServerArgs: ['--xpack.observability.unsafe.thresholdRule.enabled=true'],
// load tests in the index file // load tests in the index file
testFiles: [require.resolve('./index.feature_flags.ts')], testFiles: [require.resolve('./index.feature_flags.ts')],
// 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', 'xpack.ml.nlp.enabled=false'],
}); });

View file

@ -16,4 +16,8 @@ export default createTestConfig({
}, },
suiteTags: { exclude: ['skipSvlOblt'] }, suiteTags: { exclude: ['skipSvlOblt'] },
services, 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', 'xpack.ml.nlp.enabled=false'],
}); });

View file

@ -21,4 +21,8 @@ export default createTestConfig({
kbnServerArgs: [], kbnServerArgs: [],
// load tests in the index file // load tests in the index file
testFiles: [require.resolve('./index.feature_flags.ts')], testFiles: [require.resolve('./index.feature_flags.ts')],
// include settings from project controller
// https://github.com/elastic/project-controller/blob/main/internal/project/esproject/config/elasticsearch.yml
esServerArgs: ['xpack.ml.ad.enabled=false', 'xpack.ml.dfa.enabled=false'],
}); });

View file

@ -14,4 +14,8 @@ export default createTestConfig({
reportName: 'Serverless Search API Integration Tests', reportName: 'Serverless Search API Integration Tests',
}, },
suiteTags: { exclude: ['skipSvlSearch'] }, suiteTags: { exclude: ['skipSvlSearch'] },
// include settings from project controller
// https://github.com/elastic/project-controller/blob/main/internal/project/esproject/config/elasticsearch.yml
esServerArgs: ['xpack.ml.ad.enabled=false', 'xpack.ml.dfa.enabled=false'],
}); });

View file

@ -21,4 +21,8 @@ export default createTestConfig({
kbnServerArgs: [], kbnServerArgs: [],
// load tests in the index file // load tests in the index file
testFiles: [require.resolve('./index.feature_flags.ts')], testFiles: [require.resolve('./index.feature_flags.ts')],
// include settings from project controller
// https://github.com/elastic/project-controller/blob/main/internal/project/security/config/elasticsearch.yml
esServerArgs: ['xpack.ml.nlp.enabled=false'],
}); });

View file

@ -14,4 +14,8 @@ export default createTestConfig({
reportName: 'Serverless Security API Integration Tests', reportName: 'Serverless Security API Integration Tests',
}, },
suiteTags: { exclude: ['skipSvlSec'] }, suiteTags: { exclude: ['skipSvlSec'] },
// include settings from project controller
// https://github.com/elastic/project-controller/blob/main/internal/project/security/config/elasticsearch.yml
esServerArgs: ['xpack.ml.nlp.enabled=false'],
}); });

View file

@ -22,6 +22,13 @@ export function createTestConfig(options: CreateTestConfigOptions) {
pageObjects, pageObjects,
services, services,
esTestCluster: {
...svlSharedConfig.get('esTestCluster'),
serverArgs: [
...svlSharedConfig.get('esTestCluster.serverArgs'),
...(options.esServerArgs ?? []),
],
},
kbnTestServer: { kbnTestServer: {
...svlSharedConfig.get('kbnTestServer'), ...svlSharedConfig.get('kbnTestServer'),
serverArgs: [ serverArgs: [

View file

@ -20,4 +20,8 @@ export default createTestConfig({
resolve(REPO_ROOT, 'examples'), resolve(REPO_ROOT, 'examples'),
resolve(REPO_ROOT, 'x-pack/examples'), resolve(REPO_ROOT, 'x-pack/examples'),
]), ]),
// 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', 'xpack.ml.nlp.enabled=false'],
}); });

View file

@ -21,4 +21,8 @@ export default createTestConfig({
kbnServerArgs: [], kbnServerArgs: [],
// load tests in the index file // load tests in the index file
testFiles: [require.resolve('./index.feature_flags.ts')], testFiles: [require.resolve('./index.feature_flags.ts')],
// 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', 'xpack.ml.nlp.enabled=false'],
}); });

View file

@ -14,4 +14,8 @@ export default createTestConfig({
reportName: 'Serverless Observability Functional Tests', reportName: 'Serverless Observability Functional Tests',
}, },
suiteTags: { exclude: ['skipSvlOblt'] }, 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', 'xpack.ml.nlp.enabled=false'],
}); });

View file

@ -20,4 +20,8 @@ export default createTestConfig({
resolve(REPO_ROOT, 'examples'), resolve(REPO_ROOT, 'examples'),
resolve(REPO_ROOT, 'x-pack/examples'), resolve(REPO_ROOT, 'x-pack/examples'),
]), ]),
// include settings from project controller
// https://github.com/elastic/project-controller/blob/main/internal/project/esproject/config/elasticsearch.yml
esServerArgs: ['xpack.ml.ad.enabled=false', 'xpack.ml.dfa.enabled=false'],
}); });

View file

@ -21,4 +21,8 @@ export default createTestConfig({
kbnServerArgs: [], kbnServerArgs: [],
// load tests in the index file // load tests in the index file
testFiles: [require.resolve('./index.feature_flags.ts')], testFiles: [require.resolve('./index.feature_flags.ts')],
// include settings from project controller
// https://github.com/elastic/project-controller/blob/main/internal/project/esproject/config/elasticsearch.yml
esServerArgs: ['xpack.ml.ad.enabled=false', 'xpack.ml.dfa.enabled=false'],
}); });

View file

@ -16,4 +16,8 @@ export default createTestConfig({
junit: { junit: {
reportName: 'Serverless Search Screenshot Creation', reportName: 'Serverless Search Screenshot Creation',
}, },
// include settings from project controller
// https://github.com/elastic/project-controller/blob/main/internal/project/esproject/config/elasticsearch.yml
esServerArgs: ['xpack.ml.ad.enabled=false', 'xpack.ml.dfa.enabled=false'],
}); });

View file

@ -14,4 +14,8 @@ export default createTestConfig({
reportName: 'Serverless Search Functional Tests', reportName: 'Serverless Search Functional Tests',
}, },
suiteTags: { exclude: ['skipSvlSearch'] }, suiteTags: { exclude: ['skipSvlSearch'] },
// include settings from project controller
// https://github.com/elastic/project-controller/blob/main/internal/project/esproject/config/elasticsearch.yml
esServerArgs: ['xpack.ml.ad.enabled=false', 'xpack.ml.dfa.enabled=false'],
}); });

View file

@ -20,4 +20,8 @@ export default createTestConfig({
resolve(REPO_ROOT, 'examples'), resolve(REPO_ROOT, 'examples'),
resolve(REPO_ROOT, 'x-pack/examples'), resolve(REPO_ROOT, 'x-pack/examples'),
]), ]),
// include settings from project controller
// https://github.com/elastic/project-controller/blob/main/internal/project/security/config/elasticsearch.yml
esServerArgs: ['xpack.ml.nlp.enabled=false'],
}); });

View file

@ -21,4 +21,8 @@ export default createTestConfig({
kbnServerArgs: [], kbnServerArgs: [],
// load tests in the index file // load tests in the index file
testFiles: [require.resolve('./index.feature_flags.ts')], testFiles: [require.resolve('./index.feature_flags.ts')],
// include settings from project controller
// https://github.com/elastic/project-controller/blob/main/internal/project/security/config/elasticsearch.yml
esServerArgs: ['xpack.ml.nlp.enabled=false'],
}); });

View file

@ -14,4 +14,8 @@ export default createTestConfig({
reportName: 'Serverless Security Functional Tests', reportName: 'Serverless Security Functional Tests',
}, },
suiteTags: { exclude: ['skipSvlSec'] }, suiteTags: { exclude: ['skipSvlSec'] },
// include settings from project controller
// https://github.com/elastic/project-controller/blob/main/internal/project/security/config/elasticsearch.yml
esServerArgs: ['xpack.ml.nlp.enabled=false'],
}); });

View file

@ -9,6 +9,7 @@ import { InheritedServices } from '../../api_integration/services';
export interface CreateTestConfigOptions { export interface CreateTestConfigOptions {
serverlessProject: 'es' | 'oblt' | 'security'; serverlessProject: 'es' | 'oblt' | 'security';
esServerArgs?: string[];
kbnServerArgs?: string[]; kbnServerArgs?: string[];
testFiles: string[]; testFiles: string[];
junit: { reportName: string }; junit: { reportName: string };