From 288e67e16681ca1b3280ddaeb5e3f37b675b091c Mon Sep 17 00:00:00 2001 From: Xavi Aracil Date: Wed, 7 Dec 2022 17:41:02 +0100 Subject: [PATCH] Default return for non existent field is success --- .../java/org/oneedtech/inspect/vc/probe/PropertyProbe.java | 2 +- .../oneedtech/inspect/vc/probe/StringValuePropertyProbe.java | 2 +- .../vc/probe/validation/ValidationImagePropertyProbe.java | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/inspector-vc/src/main/java/org/oneedtech/inspect/vc/probe/PropertyProbe.java b/inspector-vc/src/main/java/org/oneedtech/inspect/vc/probe/PropertyProbe.java index ed21f18..cd1232a 100644 --- a/inspector-vc/src/main/java/org/oneedtech/inspect/vc/probe/PropertyProbe.java +++ b/inspector-vc/src/main/java/org/oneedtech/inspect/vc/probe/PropertyProbe.java @@ -37,6 +37,6 @@ public class PropertyProbe extends Probe { } private ReportItems defaultValidation(JsonNode node, RunContext ctx) { - return notRun("Not additional validations run", ctx); + return success(ctx); } } diff --git a/inspector-vc/src/main/java/org/oneedtech/inspect/vc/probe/StringValuePropertyProbe.java b/inspector-vc/src/main/java/org/oneedtech/inspect/vc/probe/StringValuePropertyProbe.java index 5c792d0..5a3ff3b 100644 --- a/inspector-vc/src/main/java/org/oneedtech/inspect/vc/probe/StringValuePropertyProbe.java +++ b/inspector-vc/src/main/java/org/oneedtech/inspect/vc/probe/StringValuePropertyProbe.java @@ -28,7 +28,7 @@ public class StringValuePropertyProbe extends PropertyProbe { } private ReportItems defaultValidation(List nodeValues, RunContext ctx) { - return notRun("Not additional validations run", ctx); + return success(ctx); } diff --git a/inspector-vc/src/main/java/org/oneedtech/inspect/vc/probe/validation/ValidationImagePropertyProbe.java b/inspector-vc/src/main/java/org/oneedtech/inspect/vc/probe/validation/ValidationImagePropertyProbe.java index 3dd3f2c..b5cdbcd 100644 --- a/inspector-vc/src/main/java/org/oneedtech/inspect/vc/probe/validation/ValidationImagePropertyProbe.java +++ b/inspector-vc/src/main/java/org/oneedtech/inspect/vc/probe/validation/ValidationImagePropertyProbe.java @@ -30,7 +30,8 @@ public class ValidationImagePropertyProbe extends ValidationPropertyProbe { @Override protected ReportItems reportForNonExistentProperty(JsonNode node, RunContext ctx) { - return notRun("Could not load and validate image in node " + node.toString(), ctx); + // Could not load and validate image in node + return success(ctx); } @Override