Skip to content

Commit 2fb2bb2

Browse files
committed
[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
1 parent ec01665 commit 2fb2bb2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

x-pack/docs/src/test/java/org/elasticsearch/smoketest/XDocsClientYamlTestSuiteIT.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public void reenableWatcher() throws Exception {
104104
@Override
105105
protected boolean isWatcherTest() {
106106
String testName = getTestName();
107-
return testName != null && testName.contains("watcher/");
107+
return testName != null && (testName.contains("watcher/") || testName.contains("watcher\\"));
108108
}
109109

110110
@Override
@@ -115,13 +115,13 @@ protected boolean isMonitoringTest() {
115115
@Override
116116
protected boolean isMachineLearningTest() {
117117
String testName = getTestName();
118-
return testName != null && testName.contains("ml/");
118+
return testName != null && (testName.contains("ml/") || testName.contains("ml\\"));
119119
}
120120

121121
@Override
122122
protected boolean isRollupTest() {
123123
String testName = getTestName();
124-
return testName != null && testName.contains("rollup/");
124+
return testName != null && (testName.contains("rollup/") || testName.contains("rollup\\"));
125125
}
126126

127127
/**

0 commit comments

Comments
 (0)