From 818efd2554c3b4e52f3fecc428962b967e8a5eb5 Mon Sep 17 00:00:00 2001 From: Dzmitry Lemechko Date: Sat, 15 Jul 2023 00:49:37 +0200 Subject: [PATCH] [ftr] define default FTR services for serverless (#161946) Cypress tests were failing with esArchiver service unavailability. This PR fixes it by adding basic services (es, kibanaServier, esArchive & retry) from `@kbn/ftr-common-functional-services` in shared FTR configuration file. This way all the child config files will have these services pre-loaded. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> --- .../test_suites/security/cypress/security_config.base.ts | 1 - x-pack/test_serverless/shared/config.base.ts | 5 +++++ x-pack/test_serverless/tsconfig.json | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/x-pack/test_serverless/functional/test_suites/security/cypress/security_config.base.ts b/x-pack/test_serverless/functional/test_suites/security/cypress/security_config.base.ts index 19d9b2f65ace..515ea0c52efe 100644 --- a/x-pack/test_serverless/functional/test_suites/security/cypress/security_config.base.ts +++ b/x-pack/test_serverless/functional/test_suites/security/cypress/security_config.base.ts @@ -20,7 +20,6 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { ...svlSharedConfig.get('esTestCluster.serverArgs'), // define custom es server here // API Keys is enabled at the top level - 'xpack.security.enabled=true', ], }, kbnTestServer: { diff --git a/x-pack/test_serverless/shared/config.base.ts b/x-pack/test_serverless/shared/config.base.ts index 4c7f1e89aa2e..fa940bb8f3fc 100644 --- a/x-pack/test_serverless/shared/config.base.ts +++ b/x-pack/test_serverless/shared/config.base.ts @@ -10,6 +10,7 @@ import { format as formatUrl } from 'url'; import { REPO_ROOT } from '@kbn/repo-info'; import { esTestConfig, kbnTestConfig, kibanaServerTestUser } from '@kbn/test'; +import { commonFunctionalServices } from '@kbn/ftr-common-functional-services'; export default async () => { const servers = { @@ -66,6 +67,10 @@ export default async () => { // Used by FTR to recognize serverless project and change its behavior accordingly serverless: true, + services: { + ...commonFunctionalServices, + }, + // overriding default timeouts from packages/kbn-test/src/functional_test_runner/lib/config/schema.ts // so we can easily adjust them for serverless where needed timeouts: { diff --git a/x-pack/test_serverless/tsconfig.json b/x-pack/test_serverless/tsconfig.json index d22c615cfe50..9bf29d87b413 100644 --- a/x-pack/test_serverless/tsconfig.json +++ b/x-pack/test_serverless/tsconfig.json @@ -26,5 +26,6 @@ "@kbn/telemetry-plugin", "@kbn/telemetry-collection-xpack-plugin", "@kbn/telemetry-tools", + "@kbn/ftr-common-functional-services", ] }