[TEST] Fix Feature Flags in Test Framework and SortTemplates yaml failure (#82)
This commit adds parse logic to correctly parse feature flags in the test framework. It also fixes a test failure in cat.templates/Sort Templates yaml test. Signed-off-by: Peter Nied <petern@amazon.com>
This commit is contained in:
parent
fc3922aee4
commit
b360d4fb61
|
@ -230,8 +230,8 @@
|
||||||
- match:
|
- match:
|
||||||
$body: |
|
$body: |
|
||||||
/^
|
/^
|
||||||
test \s+ \[t\*\] \s+ \n \n
|
test \s+ \[t\*\] \s+ \n
|
||||||
test_1 \s+ \[te\*\] \s+ 1 \n \n
|
test_1 \s+ \[te\*\] \s+ 1 \n
|
||||||
$/
|
$/
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
|
@ -242,8 +242,8 @@
|
||||||
- match:
|
- match:
|
||||||
$body: |
|
$body: |
|
||||||
/^
|
/^
|
||||||
test_1 \s+ \[te\*\] \s+ 1\n \n
|
test_1 \s+ \[te\*\] \s+ 1\n
|
||||||
test \s+ \[t\*\] \s+ \n \n
|
test \s+ \[t\*\] \s+ \n
|
||||||
|
|
||||||
$/
|
$/
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,17 @@ public class SkipSection {
|
||||||
} else if ("reason".equals(currentFieldName)) {
|
} else if ("reason".equals(currentFieldName)) {
|
||||||
reason = parser.text();
|
reason = parser.text();
|
||||||
} else if ("features".equals(currentFieldName)) {
|
} else if ("features".equals(currentFieldName)) {
|
||||||
features.add(parser.text());
|
String f = parser.text();
|
||||||
|
// split on ','
|
||||||
|
String[] fs = f.split(",");
|
||||||
|
if (fs != null) {
|
||||||
|
// add each feature, separately:
|
||||||
|
for (String feature : fs) {
|
||||||
|
features.add(feature.trim());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
features.add(f);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
throw new ParsingException(parser.getTokenLocation(),
|
throw new ParsingException(parser.getTokenLocation(),
|
||||||
|
|
Loading…
Reference in New Issue