diff --git a/x-pack/test/apm_api_integration/tests/diagnostics/index_pattern_settings.ts b/x-pack/test/apm_api_integration/tests/diagnostics/index_pattern_settings.ts index 64749066a2e04d..d0ba7b1850d311 100644 --- a/x-pack/test/apm_api_integration/tests/diagnostics/index_pattern_settings.ts +++ b/x-pack/test/apm_api_integration/tests/diagnostics/index_pattern_settings.ts @@ -24,7 +24,9 @@ export default function ApiTest({ getService }: FtrProviderContext) { describe('When there is no data', () => { before(async () => { // delete APM index templates - await es.indices.deleteIndexTemplate({ name: getApmIndexTemplateNames() }); + await es.indices.deleteIndexTemplate({ + name: Object.values(getApmIndexTemplateNames()).flat(), + }); }); it('returns the built-in (non-APM) index templates`', async () => { diff --git a/x-pack/test/apm_api_integration/tests/diagnostics/index_templates.spec.ts b/x-pack/test/apm_api_integration/tests/diagnostics/index_templates.spec.ts index 2ece2835b59444..5c94de56abb30d 100644 --- a/x-pack/test/apm_api_integration/tests/diagnostics/index_templates.spec.ts +++ b/x-pack/test/apm_api_integration/tests/diagnostics/index_templates.spec.ts @@ -24,7 +24,9 @@ export default function ApiTest({ getService }: FtrProviderContext) { describe('When there is no data', () => { before(async () => { // delete APM index templates - await es.indices.deleteIndexTemplate({ name: getApmIndexTemplateNames() }); + await es.indices.deleteIndexTemplate({ + name: Object.values(getApmIndexTemplateNames()).flat(), + }); }); it('verifies that none of the default APM index templates exists`', async () => {