@@ -304,9 +304,11 @@ private static function wipeDataStreams(Client $client): void
304
304
} catch (ElasticsearchException $ e ) {
305
305
// We hit a version of ES that doesn't understand expand_wildcards, try again without it
306
306
try {
307
- $ client ->indices ()->deleteDataStream ([
308
- 'name ' => '* '
309
- ]);
307
+ if (getenv ('TEST_SUITE ' ) === 'platinum ' ) {
308
+ $ client ->indices ()->deleteDataStream ([
309
+ 'name ' => '* '
310
+ ]);
311
+ }
310
312
} catch (ElasticsearchException $ e ) {
311
313
// We hit a version of ES that doesn't serialize DeleteDataStreamAction.Request#wildcardExpressionsOriginallySpecified
312
314
// field or that doesn't support data streams so it's safe to ignore
@@ -476,6 +478,9 @@ private static function isXPackTemplate(string $name): bool
476
478
if (strpos ($ name , '.transform- ' ) !== false ) {
477
479
return true ;
478
480
}
481
+ if (strpos ($ name , '.deprecation- ' ) !== false ) {
482
+ return true ;
483
+ }
479
484
switch ($ name ) {
480
485
case ".watches " :
481
486
case "logstash-index-template " :
@@ -577,13 +582,11 @@ private static function deleteAllTasks(Client $client): void
577
582
*/
578
583
private static function deleteAllNodeShutdownMetadata (Client $ client )
579
584
{
580
- $ nodes = $ client ->shutdown ()->getNode ();
581
- if (isset ($ nodes ['_nodes ' ]) && isset ($ nodes ['cluster_name ' ])) {
582
- // If the response contains these two keys, the feature flag isn't enabled on this cluster, so skip out now.
583
- // We can't check the system property directly because it only gets set for the cluster under test's JVM, not for the test
584
- // runner's JVM.
585
+ if (getenv ('TEST_SUITE ' ) !== 'platinum ' || version_compare (self ::getVersion ($ client ), '7.15.0 ' ) < 0 ) {
586
+ // Node shutdown APIs are only present in xpack from 7.15+
585
587
return ;
586
588
}
589
+ $ nodes = $ client ->shutdown ()->getNode ();
587
590
foreach ($ nodes ['nodes ' ] as $ node ) {
588
591
$ client ->shutdown ()->deleteNode ($ node ['node_id ' ]);
589
592
}
0 commit comments