From 5d94003dc028280cf80c9b38e373dc73a5c511ba Mon Sep 17 00:00:00 2001 From: David Kyle Date: Mon, 2 Jul 2018 13:10:52 +0100 Subject: [PATCH] [DOCS] Check for Windows and *nix file paths (#31648) Proper cleanup of the docs snippet tests depends on detecting what is being tested (ML, Watcher, etc) this is deduced from the file path and so we must account for Windows and Unix path separators --- .../elasticsearch/smoketest/XDocsClientYamlTestSuiteIT.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x-pack/docs/src/test/java/org/elasticsearch/smoketest/XDocsClientYamlTestSuiteIT.java b/x-pack/docs/src/test/java/org/elasticsearch/smoketest/XDocsClientYamlTestSuiteIT.java index 0196406c478..e534e4f41bb 100644 --- a/x-pack/docs/src/test/java/org/elasticsearch/smoketest/XDocsClientYamlTestSuiteIT.java +++ b/x-pack/docs/src/test/java/org/elasticsearch/smoketest/XDocsClientYamlTestSuiteIT.java @@ -107,7 +107,7 @@ public class XDocsClientYamlTestSuiteIT extends XPackRestIT { @Override protected boolean isWatcherTest() { String testName = getTestName(); - return testName != null && testName.contains("watcher/"); + return testName != null && (testName.contains("watcher/") || testName.contains("watcher\\")); } @Override @@ -118,13 +118,13 @@ public class XDocsClientYamlTestSuiteIT extends XPackRestIT { @Override protected boolean isMachineLearningTest() { String testName = getTestName(); - return testName != null && testName.contains("ml/"); + return testName != null && (testName.contains("ml/") || testName.contains("ml\\")); } @Override protected boolean isRollupTest() { String testName = getTestName(); - return testName != null && testName.contains("rollup/"); + return testName != null && (testName.contains("rollup/") || testName.contains("rollup\\")); } /**