Skip to content

Commit 5a66544

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 f784d0a commit 5a66544

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
@@ -107,7 +107,7 @@ public void reenableWatcher() throws Exception {
107107
@Override
108108
protected boolean isWatcherTest() {
109109
String testName = getTestName();
110-
return testName != null && testName.contains("watcher/");
110+
return testName != null && (testName.contains("watcher/") || testName.contains("watcher\\"));
111111
}
112112

113113
@Override
@@ -118,13 +118,13 @@ protected boolean isMonitoringTest() {
118118
@Override
119119
protected boolean isMachineLearningTest() {
120120
String testName = getTestName();
121-
return testName != null && testName.contains("ml/");
121+
return testName != null && (testName.contains("ml/") || testName.contains("ml\\"));
122122
}
123123

124124
@Override
125125
protected boolean isRollupTest() {
126126
String testName = getTestName();
127-
return testName != null && testName.contains("rollup/");
127+
return testName != null && (testName.contains("rollup/") || testName.contains("rollup\\"));
128128
}
129129

130130
/**

0 commit comments

Comments
 (0)