Test: match the \ilm/ and \slm/ test name too (#51811) (#51919)

We only drop ilm/slm policies on teardown only if the running docs tests
are ilm/slm related.

This updates the test name pattern to match the ilm/slm related tests
when running on windows
(eg.`reference\ilm/update-lifecycle-policy/line_29`).

(cherry picked from commit 4bb5bbd52eee59bd3eee6d766a9efc159822d9b9)
Signed-off-by: Andrei Dan <andrei.dan@elastic.co>
This commit is contained in:
Andrei Dan 2020-02-05 09:56:53 +00:00 committed by GitHub
parent b4480bb8a4
commit 4def3694ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -143,14 +143,14 @@ public class DocsClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {
protected boolean isSLMTest() { protected boolean isSLMTest() {
String testName = getTestName(); String testName = getTestName();
return testName != null && (testName.contains("/slm/") || testName.contains("\\slm\\") || return testName != null && (testName.contains("/slm/") || testName.contains("\\slm\\") || (testName.contains("\\slm/")) ||
// TODO: Remove after backport of https://github.com/elastic/elasticsearch/pull/48705 which moves SLM docs to correct folder // TODO: Remove after backport of https://github.com/elastic/elasticsearch/pull/48705 which moves SLM docs to correct folder
testName.contains("/ilm/") || testName.contains("\\ilm\\")); testName.contains("/ilm/") || testName.contains("\\ilm\\") || testName.contains("\\ilm/"));
} }
protected boolean isILMTest() { protected boolean isILMTest() {
String testName = getTestName(); String testName = getTestName();
return testName != null && (testName.contains("/ilm/") || testName.contains("\\ilm\\")); return testName != null && (testName.contains("/ilm/") || testName.contains("\\ilm\\") || testName.contains("\\ilm/"));
} }
protected boolean isMachineLearningTest() { protected boolean isMachineLearningTest() {