simplified rest skip range version parsing more, ranges can now be open
ended
This commit is contained in:
parent
9e0a9588e8
commit
68f75ea7b6
|
@ -65,7 +65,7 @@ skipped, and the reason why the tests are skipped. For instance:
|
|||
....
|
||||
"Parent":
|
||||
- skip:
|
||||
version: "0 - 0.90.2"
|
||||
version: "0.20.1 - 0.90.2"
|
||||
reason: Delete ignores the parent param
|
||||
|
||||
- do:
|
||||
|
@ -75,14 +75,17 @@ skipped, and the reason why the tests are skipped. For instance:
|
|||
All tests in the file following the skip statement should be skipped if:
|
||||
`min <= current <= max`.
|
||||
|
||||
The `version` range should always have an upper bound. Versions should
|
||||
either have each version part compared numerically, or should be converted
|
||||
to a string with sufficient digits to allow string comparison, eg
|
||||
The `version` range can leave either bound empty, which means "open ended".
|
||||
For instance:
|
||||
....
|
||||
"Parent":
|
||||
- skip:
|
||||
version: "1.0.0.Beta1 - "
|
||||
reason: Delete ignores the parent param
|
||||
|
||||
0.90.2 -> 000-090-002
|
||||
|
||||
Snapshot versions and versions of the form `1.0.0.Beta1` can be treated
|
||||
as the rounded down version, eg `1.0.0`.
|
||||
- do:
|
||||
... test definitions ...
|
||||
....
|
||||
|
||||
The skip section can also be used to list new features that need to be
|
||||
supported in order to run a test. This way the up-to-date runners will
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
setup:
|
||||
- skip:
|
||||
version: 0 - 999
|
||||
version: " - "
|
||||
reason: leaves transient metadata behind, need to fix it
|
||||
---
|
||||
"Test put settings":
|
||||
|
|
|
@ -166,7 +166,7 @@ setup:
|
|||
"Should return test_index_3 if expand_wildcards=closed":
|
||||
|
||||
- skip:
|
||||
version: "0 - 2.0.0"
|
||||
version: " - 2.0.0"
|
||||
reason: Requires fix for issue 7258
|
||||
|
||||
- do:
|
||||
|
|
|
@ -202,7 +202,7 @@ setup:
|
|||
"Getting alias on an non-existent index should return 404":
|
||||
|
||||
- skip:
|
||||
version: 0 - 999
|
||||
version: "1.0.0.Beta1 - "
|
||||
reason: not implemented yet
|
||||
- do:
|
||||
catch: missing
|
||||
|
|
|
@ -81,7 +81,7 @@ setup:
|
|||
---
|
||||
"put settings in list of indices":
|
||||
- skip:
|
||||
version: 0 - 999
|
||||
version: " - "
|
||||
reason: list of indices not implemented yet
|
||||
- do:
|
||||
indices.put_settings:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"Metadata Fields":
|
||||
|
||||
- skip:
|
||||
version: "0 - 999"
|
||||
version: " - "
|
||||
reason: "Update doesn't return metadata fields, waiting for #3259"
|
||||
|
||||
- do:
|
||||
|
|
|
@ -105,8 +105,8 @@ public class SkipSection {
|
|||
String lower = skipVersions[0].trim();
|
||||
String upper = skipVersions[1].trim();
|
||||
return new Version[] {
|
||||
lower.equals("0") ? VersionUtils.getFirstVersion() : Version.fromString(lower),
|
||||
upper.equals("999") ? Version.CURRENT : Version.fromString(upper)
|
||||
lower.isEmpty() ? VersionUtils.getFirstVersion() : Version.fromString(lower),
|
||||
upper.isEmpty() ? Version.CURRENT : Version.fromString(upper)
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@ public class RestTestParserTests extends ElasticsearchTestCase {
|
|||
"\"Get type mapping - pre 1.0\":\n" +
|
||||
"\n" +
|
||||
" - skip:\n" +
|
||||
" version: \"0.90.9 - 999\"\n" +
|
||||
" version: \"0.90.9 - \"\n" +
|
||||
" reason: \"for newer versions the index name is always returned\"\n" +
|
||||
"\n" +
|
||||
" - do:\n" +
|
||||
|
|
|
@ -34,7 +34,7 @@ public class SkipSectionParserTests extends AbstractParserTests {
|
|||
@Test
|
||||
public void testParseSkipSectionVersionNoFeature() throws Exception {
|
||||
parser = YamlXContent.yamlXContent.createParser(
|
||||
"version: \"0 - 0.90.2\"\n" +
|
||||
"version: \" - 0.90.2\"\n" +
|
||||
"reason: Delete ignores the parent param"
|
||||
);
|
||||
|
||||
|
@ -88,7 +88,7 @@ public class SkipSectionParserTests extends AbstractParserTests {
|
|||
@Test(expected = RestTestParseException.class)
|
||||
public void testParseSkipSectionBothFeatureAndVersion() throws Exception {
|
||||
parser = YamlXContent.yamlXContent.createParser(
|
||||
"version: \"0 - 0.90.2\"\n" +
|
||||
"version: \" - 0.90.2\"\n" +
|
||||
"features: regex\n" +
|
||||
"reason: Delete ignores the parent param"
|
||||
);
|
||||
|
@ -101,7 +101,7 @@ public class SkipSectionParserTests extends AbstractParserTests {
|
|||
@Test(expected = RestTestParseException.class)
|
||||
public void testParseSkipSectionNoReason() throws Exception {
|
||||
parser = YamlXContent.yamlXContent.createParser(
|
||||
"version: \"0 - 0.90.2\"\n"
|
||||
"version: \" - 0.90.2\"\n"
|
||||
);
|
||||
|
||||
SkipSectionParser skipSectionParser = new SkipSectionParser();
|
||||
|
|
Loading…
Reference in New Issue