66package org .elasticsearch .xpack .test .rest ;
77
88import com .carrotsearch .randomizedtesting .annotations .ParametersFactory ;
9+
910import org .apache .http .HttpStatus ;
1011import org .elasticsearch .ElasticsearchException ;
1112import org .elasticsearch .common .CheckedFunction ;
2425import org .elasticsearch .xpack .core .ml .job .persistence .AnomalyDetectorsIndexFields ;
2526import org .elasticsearch .xpack .core .ml .notifications .NotificationsIndex ;
2627import org .elasticsearch .xpack .core .rollup .job .RollupJob ;
28+ import org .elasticsearch .xpack .core .transform .transforms .persistence .TransformInternalIndexConstants ;
2729import org .junit .After ;
2830import org .junit .Before ;
2931
@@ -75,7 +77,7 @@ public void setupForTests() throws Exception {
7577 }
7678
7779 /**
78- * Waits for the Security template and the Machine Learning templates to be created by the {@link MetaDataUpgrader}
80+ * Waits for Machine Learning and Transform templates to be created by the {@link MetaDataUpgrader}
7981 */
8082 private void waitForTemplates () throws Exception {
8183 if (installTemplates ()) {
@@ -86,7 +88,10 @@ private void waitForTemplates() throws Exception {
8688 MlMetaIndex .INDEX_NAME ,
8789 AnomalyDetectorsIndexFields .STATE_INDEX_PREFIX ,
8890 AnomalyDetectorsIndex .jobResultsIndexPrefix (),
89- AnomalyDetectorsIndex .configIndexName ()));
91+ AnomalyDetectorsIndex .configIndexName (),
92+ TransformInternalIndexConstants .AUDIT_INDEX ,
93+ TransformInternalIndexConstants .LATEST_INDEX_NAME
94+ ));
9095
9196 for (String template : templates ) {
9297 awaitCallApi ("indices.exists_template" , singletonMap ("name" , template ), emptyList (),
0 commit comments