kibana/x-pack/test/licensing_plugin/config.ts
Mikhail Shustov 0ded3cb094
Licensing plugin functional tests (#53580)
* NP licensing add functional tests (#53002)

* fix comment

* introduce core provider plugin for integration tests

* platform functional tests use core_provider_plugin for testing

* add 3 scenario for licensing plugins: server, client, legacy

* remove unused code

* run all licensing_plugin tests on CI

* remove duplicated config

* address comments

* declare global type for core provider

* remove potentially dangerous operation

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2019-12-24 12:31:18 +03:00

54 lines
1.5 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;
* you may not use this file except in compliance with the Elastic License.
*/
import { FtrConfigProviderContext } from '@kbn/test/types/ftr';
import { services, pageObjects } from './services';
const license = 'basic';
export default async function({ readConfigFile }: FtrConfigProviderContext) {
const functionalTestsConfig = await readConfigFile(require.resolve('../functional/config.js'));
const servers = {
...functionalTestsConfig.get('servers'),
elasticsearch: {
...functionalTestsConfig.get('servers.elasticsearch'),
},
kibana: {
...functionalTestsConfig.get('servers.kibana'),
},
};
return {
testFiles: [require.resolve('./server')],
servers,
services,
pageObjects,
junit: {
reportName: 'License plugin API Integration Tests',
},
esTestCluster: {
...functionalTestsConfig.get('esTestCluster'),
license,
serverArgs: [
...functionalTestsConfig.get('esTestCluster.serverArgs'),
'xpack.security.enabled=true',
],
},
kbnTestServer: {
...functionalTestsConfig.get('kbnTestServer'),
serverArgs: [
...functionalTestsConfig.get('kbnTestServer.serverArgs'),
'--xpack.licensing.api_polling_frequency=100',
],
},
apps: {
...functionalTestsConfig.get('apps'),
},
};
}