kibana/x-pack/test/api_integration/config.ts
Liza Katz 7fbcf68d73
[Search Sessions] Save all sessions, with persisted flag (#89570)
* [data.search] Add search session methods to search service contract

* Fix types

* Fix tests and switch to cancel

* Update docs

* Fix types/tests

* Fix tests

* Update status of SO before cancelling search requests

* Add API integration test

* Fix types

* Update expiration route to use config defaultExpiration

* Fix test

* Update docs

* New logic for extend

* Remove declare module

* Search Sessions: Unskip Flaky Functional Test

* Review feedback

* fix ts

* Save all search sessions and then manage them based on their persisted state

* Get default search session expiration from config

* randomize sleep time

* fix test

* Remove test that is no longer valid

* fix test

* Make sure we poll, and dont persist, searches not in the context of a session

* Added keepalive unit tests

* fix ts

* code review @lukasolson

* ts

* More tests, rename onScreenTimeout to completedTimeout

* lint

* lint

* Delete async seaches

* Support saved object pagination
Fix get search status tests

* better PersistedSearchSessionSavedObjectAttributes ts

* test titles

* Fix undefined bug

* Remove runAt from monitoring task
Increase testing trackingInterval (caused bug)

* support workload histograms that take into account overdue tasks

* Update touched when changing session status to complete \ error

* removed test

* Updated management test data

* Rename configs

* delete tap first
add comments

* Use DataRequestHandlerContext in maps

* ts

* Fixed ts

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
Co-authored-by: Timothy Sullivan <tsullivan@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Anton Dosov <anton.dosov@elastic.co>
Co-authored-by: Gidi Meir Morris <github@gidi.io>
2021-02-03 23:15:41 +02:00

49 lines
1.9 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 } from './services';
export async function getApiIntegrationConfig({ readConfigFile }: FtrConfigProviderContext) {
const xPackFunctionalTestsConfig = await readConfigFile(
require.resolve('../functional/config.js')
);
return {
testFiles: [require.resolve('./apis')],
services,
servers: xPackFunctionalTestsConfig.get('servers'),
security: xPackFunctionalTestsConfig.get('security'),
esArchiver: xPackFunctionalTestsConfig.get('esArchiver'),
junit: {
reportName: 'X-Pack API Integration Tests',
},
kbnTestServer: {
...xPackFunctionalTestsConfig.get('kbnTestServer'),
serverArgs: [
...xPackFunctionalTestsConfig.get('kbnTestServer.serverArgs'),
'--map.proxyElasticMapsServiceInMaps=true',
'--xpack.security.session.idleTimeout=3600000', // 1 hour
'--telemetry.optIn=true',
'--xpack.fleet.enabled=true',
'--xpack.fleet.agents.pollingRequestTimeout=5000', // 5 seconds
'--xpack.data_enhanced.search.sessions.enabled=true', // enable WIP send to background UI
'--xpack.data_enhanced.search.sessions.notTouchedTimeout=15s', // shorten notTouchedTimeout for quicker testing
'--xpack.data_enhanced.search.sessions.trackingInterval=5s', // shorten trackingInterval for quicker testing
],
},
esTestCluster: {
...xPackFunctionalTestsConfig.get('esTestCluster'),
serverArgs: [
...xPackFunctionalTestsConfig.get('esTestCluster.serverArgs'),
'node.attr.name=apiIntegrationTestNode',
],
},
};
}
export default getApiIntegrationConfig;