diff options
author | Arpit Singh <as00745003@techmahindra.com> | 2024-07-09 17:20:51 +0530 |
---|---|---|
committer | Arpit Singh <as00745003@techmahindra.com> | 2024-07-24 16:54:38 +0530 |
commit | d9e391c4fc21f964ee16c7c289d8ced566bec794 (patch) | |
tree | f51879949912bb31b5b6fc4a6da1901c67581e86 /cps-service/src/test | |
parent | 5cba1b8333b4b2f2d97160f0ee210dde9f25aee1 (diff) |
Update response message for data validation failure
- Make the response message more informative and cleaner in case of data
validation failure.
- Updated message body will not contain the entire jsonData as part of
response sent back to the user
Issue-ID: CPS-2306
Change-Id: I28aab1450779af98ccdd11701e78bdfcdbc18cf0
Signed-off-by: Arpit Singh <as00745003@techmahindra.com>
Diffstat (limited to 'cps-service/src/test')
-rw-r--r-- | cps-service/src/test/groovy/org/onap/cps/api/impl/CpsDataServiceImplSpec.groovy | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsDataServiceImplSpec.groovy b/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsDataServiceImplSpec.groovy index 2e38d797d9..0d3c5aa834 100644 --- a/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsDataServiceImplSpec.groovy +++ b/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsDataServiceImplSpec.groovy @@ -132,8 +132,8 @@ class CpsDataServiceImplSpec extends Specification { where: 'given parameters' scenario | invalidData | contentType || expectedMessage 'no data nodes' | '{}' | ContentType.JSON || 'No data nodes' - 'invalid json' | '{invalid json' | ContentType.JSON || 'Failed to parse json data' - 'invalid xml' | '<invalid xml' | ContentType.XML || 'Failed to parse xml data' + 'invalid json' | '{invalid json' | ContentType.JSON || 'Data Validation Failed' + 'invalid xml' | '<invalid xml' | ContentType.XML || 'Data Validation Failed' } def 'Saving list element data fragment under Root node.'() { |