|
@@ -30,6 +30,7 @@ import java.util.ArrayList;
|
|
|
import java.util.Collections;
|
|
import java.util.Collections;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
|
+import java.util.function.Predicate;
|
|
|
|
|
|
|
|
public class PhaseTests extends AbstractXContentTestCase<Phase> {
|
|
public class PhaseTests extends AbstractXContentTestCase<Phase> {
|
|
|
private String phaseName;
|
|
private String phaseName;
|
|
@@ -61,6 +62,12 @@ public class PhaseTests extends AbstractXContentTestCase<Phase> {
|
|
|
return Phase.parse(parser, phaseName);
|
|
return Phase.parse(parser, phaseName);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
|
+ protected Predicate<String> getRandomFieldsExcludeFilter() {
|
|
|
|
|
+ // actions are plucked from the named registry, and it fails if the action is not in the named registry
|
|
|
|
|
+ return (field) -> field.equals("actions");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
protected NamedXContentRegistry xContentRegistry() {
|
|
protected NamedXContentRegistry xContentRegistry() {
|
|
|
List<NamedXContentRegistry.Entry> entries = new ArrayList<>(ClusterModule.getNamedXWriteables());
|
|
List<NamedXContentRegistry.Entry> entries = new ArrayList<>(ClusterModule.getNamedXWriteables());
|
|
@@ -70,7 +77,7 @@ public class PhaseTests extends AbstractXContentTestCase<Phase> {
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
protected boolean supportsUnknownFields() {
|
|
protected boolean supportsUnknownFields() {
|
|
|
- return false;
|
|
|
|
|
|
|
+ return true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public void testDefaultAfter() {
|
|
public void testDefaultAfter() {
|