mirror of
https://github.com/elastic/kibana.git
synced 2025-06-28 03:01:21 -04:00
## Summary It seems beneficial to have feature flag tests in a separate test config file - tests are still run on Kibana CI automatically - tests are not run on MKI projects automatically, but you can deploy custom project and run tests via feature flags config All the feature flags within the same project should be places in the same config to make sure there is no arguments conflict. When the flag is moved to the yml configuration, we can rely on Kibana CI and manually triggered deployment to make sure projects are functioning correctly. --------- Co-authored-by: Robert Oskamp <robert.oskamp@elastic.co>
36 lines
1.1 KiB
TypeScript
36 lines
1.1 KiB
TypeScript
/*
|
|
* 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';
|
|
|
|
import { services } from './services';
|
|
import type { CreateTestConfigOptions } from '../shared/types';
|
|
|
|
export function createTestConfig(options: CreateTestConfigOptions) {
|
|
return async ({ readConfigFile }: FtrConfigProviderContext) => {
|
|
const svlSharedConfig = await readConfigFile(require.resolve('../shared/config.base.ts'));
|
|
|
|
return {
|
|
...svlSharedConfig.getAll(),
|
|
|
|
services: {
|
|
...services,
|
|
...options.services,
|
|
},
|
|
kbnTestServer: {
|
|
...svlSharedConfig.get('kbnTestServer'),
|
|
serverArgs: [
|
|
...svlSharedConfig.get('kbnTestServer.serverArgs'),
|
|
`--serverless=${options.serverlessProject}`,
|
|
...(options.kbnServerArgs || []),
|
|
],
|
|
},
|
|
testFiles: options.testFiles,
|
|
junit: options.junit,
|
|
suiteTags: options.suiteTags,
|
|
};
|
|
};
|
|
}
|