diff options
author | Luke Gleeson <luke.gleeson@est.tech> | 2023-03-20 15:27:38 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2023-03-20 15:27:38 +0000 |
commit | 0b00f81b98e5fa9632b1145e49f62d0b2712f4e4 (patch) | |
tree | bf71e3d1acd8b62bc80757cd7f764eb9ba44fa8d /cps-service/src/test | |
parent | ec5d74d52b3f7b10a5002be5bb9a386927300cfd (diff) | |
parent | 2b4c48824947478f12c7b2e7b962aeb6b46ae4fc (diff) |
Merge "CPS-1526 Fix response message for PATCH operation"
Diffstat (limited to 'cps-service/src/test')
-rw-r--r-- | cps-service/src/test/groovy/org/onap/cps/api/impl/CpsDataServiceImplSpec.groovy | 11 |
1 files changed, 11 insertions, 0 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 faa5d2edbd..be397b92cd 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 @@ -240,6 +240,17 @@ class CpsDataServiceImplSpec extends Specification { 'one leaf' | '{"name": "some-name"}' } + def 'Update multiple data nodes' () { + given: 'schema set for given dataspace and anchor refers multipleDataTree model' + setupSchemaSetMocks('multipleDataTree.yang') + and: 'json string with multiple data trees' + def updatedJsonData = '{"first-container":{"a-leaf":"a-new-Value"},"last-container":{"x-leaf":"x-new-value"}}' + when: 'update operation is performed on multiple data nodes' + objectUnderTest.updateNodeLeaves(dataspaceName, anchorName, '/', updatedJsonData, observedTimestamp) + then: 'expected exception is thrown' + thrown(DataValidationException) + } + def 'Update Bookstore node leaves' () { given: 'a DMI registry model' setupSchemaSetMocks('bookstore.yang') |