Skip to content

Commit 66c0f53

Browse files
committed
Exclude search tests from common suite
1 parent aaaf069 commit 66c0f53

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

qa/ccs-common-rest/src/yamlRestTest/java/org/elasticsearch/test/rest/yaml/TestSuiteApiCheck.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,16 @@ class TestSuiteApiCheck {
2525
* Returns true if the test suite should run the tests for the given API.
2626
* @param testSuite a concrete subclass of ESClientYamlSuiteTestCase
2727
* @param apiName The API name as described in the rest spec e.g. `search`
28-
* @return True if the test
28+
* @return True if the test should be run
2929
*/
3030
public static boolean shouldExecuteTest(ESClientYamlSuiteTestCase testSuite, String apiName) {
3131
return switch (testSuite) {
3232
case CssSearchYamlTestSuiteIT cssSearch -> isSearchApi(apiName);
3333
case RcsCcsSearchYamlTestSuiteIT rssSearch -> isSearchApi(apiName);
34-
default -> true;
34+
// Search tests are not executed in the common suite.
35+
case CcsCommonYamlTestSuiteIT cssCommon -> isSearchApi(apiName) == false;
36+
case RcsCcsCommonYamlTestSuiteIT rssCommon -> isSearchApi(apiName) == false;
37+
default -> throw new IllegalArgumentException("unexpected test suite [" + testSuite.getClass().getSimpleName() + "]");
3538
};
3639
}
3740

0 commit comments

Comments
 (0)