diff --git a/x-pack/test/epm_api_integration/apis/template.ts b/x-pack/test/epm_api_integration/apis/template.ts index ead34435b220379..7b82667386f8c80 100644 --- a/x-pack/test/epm_api_integration/apis/template.ts +++ b/x-pack/test/epm_api_integration/apis/template.ts @@ -17,6 +17,9 @@ export default function({ getService }: FtrProviderContext) { const body = getTemplate(indexPattern); + // This test is not an API integration test with Kibana + // We want to test here if the template is valid and for this we need a running ES instance. + // If the ES instance takes the template, we assume it is a valid template. const { body: response } = await es.indices.putTemplate({ name: templateName, body, @@ -26,6 +29,8 @@ export default function({ getService }: FtrProviderContext) { const { body: indexTemplate } = await es.indices.getTemplate({ name: templateName }); // Checks if the content of the template that was loaded is as expected + // We already know based on the above test that the template was valid + // but we check here also if we wrote the index pattern inside the template as expected expect(indexTemplate[templateName].index_patterns).to.eql([indexPattern]); }); }