From 605ef411c0dbd72019745a22f0e4a2854e63bcc0 Mon Sep 17 00:00:00 2001 From: Ignacio Rivas Date: Wed, 9 Oct 2024 12:31:27 +0200 Subject: [PATCH] Fix test --- .../test_suites/common/dev_tools/search_profiler.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/x-pack/test_serverless/functional/test_suites/common/dev_tools/search_profiler.ts b/x-pack/test_serverless/functional/test_suites/common/dev_tools/search_profiler.ts index cd3544a53acf0..979943ffa602c 100644 --- a/x-pack/test_serverless/functional/test_suites/common/dev_tools/search_profiler.ts +++ b/x-pack/test_serverless/functional/test_suites/common/dev_tools/search_profiler.ts @@ -17,6 +17,7 @@ const testQuery = { export default function ({ getPageObjects, getService }: FtrProviderContext) { const PageObjects = getPageObjects(['svlCommonPage', 'common', 'searchProfiler']); const retry = getService('retry'); + const es = getService('es'); describe('Search Profiler Editor', () => { before(async () => { @@ -71,6 +72,14 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); describe('With a test index', () => { + before(async () => { + await es.indices.create({ index: indexName }); + }); + + after(async () => { + await es.indices.delete({ index: indexName }); + }); + it('profiles a simple query', async () => { await PageObjects.searchProfiler.setIndexName(indexName); await PageObjects.searchProfiler.setQuery(testQuery);