From fa1ce1fc3e45080bc8786fa0c4800b0bfca6ebe8 Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Thu, 27 Oct 2022 00:13:16 +0000 Subject: [PATCH] [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' --- test/common/services/es_delete_all_indices.ts | 2 +- .../functional/apps/rollup_job/rollup_jobs.ts | 16 +++++++++------- x-pack/test/functional/config.ccs.ts | 2 +- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/test/common/services/es_delete_all_indices.ts b/test/common/services/es_delete_all_indices.ts index b910431e90f71..5f0ecba2cbde8 100644 --- a/test/common/services/es_delete_all_indices.ts +++ b/test/common/services/es_delete_all_indices.ts @@ -23,7 +23,7 @@ export function EsDeleteAllIndicesProvider({ getService }: FtrProviderContext) { } return async (patterns: string | string[], remote: boolean = false) => { - const esNode = remote ? getService('remoteEs' as 'es') : getService('es') + const esNode = remote ? getService('remoteEs' as 'es') : getService('es'); for (const pattern of [patterns].flat()) { for (let attempt = 1; ; attempt++) { if (attempt > 5) { diff --git a/x-pack/test/functional/apps/rollup_job/rollup_jobs.ts b/x-pack/test/functional/apps/rollup_job/rollup_jobs.ts index eb225f9c325d7..90c3893f03154 100644 --- a/x-pack/test/functional/apps/rollup_job/rollup_jobs.ts +++ b/x-pack/test/functional/apps/rollup_job/rollup_jobs.ts @@ -11,25 +11,27 @@ import { mockIndices } from './hybrid_index_helper'; import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const config = getService('config') + const config = getService('config'); const PageObjects = getPageObjects(['rollup', 'common', 'security']); const security = getService('security'); const esDeleteAllIndices = getService('esDeleteAllIndices'); const kibanaServer = getService('kibanaServer'); const es = getService('es'); - const isRunningCcs = config.get('esTestCluster.ccs') ? true : false; + const isRunningCcs = config.get('esTestCluster.ccs') ? true : false; let remoteEs; if (isRunningCcs) { remoteEs = getService('remoteEs' as 'es'); - }; + } describe.only('rollup job', function () { // Since rollups can only be created once with the same name (even if you delete it), // we add the Date.now() to avoid name collision. const rollupJobName = 'rollup-to-be-' + Date.now(); const targetIndexName = 'rollup-to-be'; - const indexPatternToUse = 'to-be*' - const rollupSourceIndexPattern = isRunningCcs ? 'ftr-remote:'+ indexPatternToUse: indexPatternToUse; + const indexPatternToUse = 'to-be*'; + const rollupSourceIndexPattern = isRunningCcs + ? 'ftr-remote:' + indexPatternToUse + : indexPatternToUse; const rollupSourceDataPrepend = 'to-be'; // make sure all dates have the same concept of "now" @@ -78,9 +80,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); // Delete all data indices that were created. - await esDeleteAllIndices([targetIndexName], false) + await esDeleteAllIndices([targetIndexName], false); if (isRunningCcs) { - await esDeleteAllIndices([indexPatternToUse], true) + await esDeleteAllIndices([indexPatternToUse], true); } else { await esDeleteAllIndices([indexPatternToUse], false); } diff --git a/x-pack/test/functional/config.ccs.ts b/x-pack/test/functional/config.ccs.ts index 11c437646d3d7..d04b542cfb965 100644 --- a/x-pack/test/functional/config.ccs.ts +++ b/x-pack/test/functional/config.ccs.ts @@ -46,7 +46,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { remoteClusterUrl: process.env.REMOTE_CLUSTER_URL ?? 'http://elastic:changeme@localhost:' + - `${functionalConfig.get('servers.elasticsearch.port') + 1}`, + `${functionalConfig.get('servers.elasticsearch.port') + 1}`, }, }, services: {