fix tests
This commit is contained in:
parent
4e88b02844
commit
2c3ea635c9
|
@ -156,16 +156,17 @@ public class ValidationTests implements IEvaluationContext, IValidatorResourceFe
|
||||||
if (content.has("use-test") && !content.get("use-test").getAsBoolean())
|
if (content.has("use-test") && !content.get("use-test").getAsBoolean())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (content.has("fetcher") && "standalone".equals(JSONUtil.str(content, "fetcher"))) {
|
|
||||||
vCurr.setFetcher(new StandAloneValidatorFetcher(vCurr.getPcm(), vCurr.getContext(), vCurr));
|
|
||||||
} else {
|
|
||||||
vCurr.setFetcher(this);
|
|
||||||
}
|
|
||||||
String testCaseContent = TestingUtilities.loadTestResource("validator", JSONUtil.str(content, "file"));
|
String testCaseContent = TestingUtilities.loadTestResource("validator", JSONUtil.str(content, "file"));
|
||||||
InstanceValidator val = vCurr.getValidator();
|
InstanceValidator val = vCurr.getValidator();
|
||||||
val.setWantCheckSnapshotUnchanged(true);
|
val.setWantCheckSnapshotUnchanged(true);
|
||||||
val.getContext().setClientRetryCount(4);
|
val.getContext().setClientRetryCount(4);
|
||||||
val.setDebug(false);
|
val.setDebug(false);
|
||||||
|
if (content.has("fetcher") && "standalone".equals(JSONUtil.str(content, "fetcher"))) {
|
||||||
|
val.setFetcher(vCurr);
|
||||||
|
vCurr.setFetcher(new StandAloneValidatorFetcher(vCurr.getPcm(), vCurr.getContext(), vCurr));
|
||||||
|
} else {
|
||||||
|
val.setFetcher(this);
|
||||||
|
}
|
||||||
if (content.has("allowed-extension-domain"))
|
if (content.has("allowed-extension-domain"))
|
||||||
val.getExtensionDomains().add(content.get("allowed-extension-domain").getAsString());
|
val.getExtensionDomains().add(content.get("allowed-extension-domain").getAsString());
|
||||||
if (content.has("allowed-extension-domains"))
|
if (content.has("allowed-extension-domains"))
|
||||||
|
|
Loading…
Reference in New Issue