summaryrefslogtreecommitdiffstats
path: root/common-parameters/src/main
diff options
context:
space:
mode:
authorramverma <ram.krishna.verma@ericsson.com>2018-08-09 12:26:28 +0100
committerramverma <ram.krishna.verma@ericsson.com>2018-08-09 12:26:56 +0100
commit240a767aee998ae4b56c569757796013b5b45b3a (patch)
tree2eadd3e0188b103284578ff071a49e9c0b93d46d /common-parameters/src/main
parentfb3c2a56b46a95c188ec4eec9c98c7bd0b881097 (diff)
Fix bug in common-paramter validation service
In GroupValidationResult & GroupMapValidationResult, the setResult method was not setting the actual status that it has recieved from the nested group rather it was setting its own status again. Due to which the validation status of overall ParameterGroup was coming as CLEAN even if a nested child has reported it as INVALID. Changed the expected validation result texts for TestValidation accordingly. Change-Id: I5943decce39574089ca74f9bbccbfbe66d8d542c Issue-ID: POLICY-1035 Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
Diffstat (limited to 'common-parameters/src/main')
-rw-r--r--common-parameters/src/main/java/org/onap/policy/common/parameters/GroupMapValidationResult.java2
-rw-r--r--common-parameters/src/main/java/org/onap/policy/common/parameters/GroupValidationResult.java4
2 files changed, 3 insertions, 3 deletions
diff --git a/common-parameters/src/main/java/org/onap/policy/common/parameters/GroupMapValidationResult.java b/common-parameters/src/main/java/org/onap/policy/common/parameters/GroupMapValidationResult.java
index 09cdc1de..e607ff98 100644
--- a/common-parameters/src/main/java/org/onap/policy/common/parameters/GroupMapValidationResult.java
+++ b/common-parameters/src/main/java/org/onap/policy/common/parameters/GroupMapValidationResult.java
@@ -122,7 +122,7 @@ public class GroupMapValidationResult implements ValidationResult {
// Set the status of the parameter group and replace the field result
validationResultMap.put(entryName, mapEntryValidationResult);
- this.setResult(status);
+ this.setResult(mapEntryValidationResult.getStatus());
}
/**
diff --git a/common-parameters/src/main/java/org/onap/policy/common/parameters/GroupValidationResult.java b/common-parameters/src/main/java/org/onap/policy/common/parameters/GroupValidationResult.java
index 703de927..ac9dc7ba 100644
--- a/common-parameters/src/main/java/org/onap/policy/common/parameters/GroupValidationResult.java
+++ b/common-parameters/src/main/java/org/onap/policy/common/parameters/GroupValidationResult.java
@@ -255,7 +255,7 @@ public class GroupValidationResult implements ValidationResult {
// Set the status of the parameter group and replace the field result
validationResultMap.put(parameterName, nestedValidationResult);
- this.setResult(status);
+ this.setResult(nestedValidationResult.getStatus());
}
/**
@@ -280,7 +280,7 @@ public class GroupValidationResult implements ValidationResult {
// Set the status of the parameter group and the field
groupMapValidationResult.setResult(key, nestedMapValidationResult);
- this.setResult(status);
+ this.setResult(nestedMapValidationResult.getStatus());
}
/**