diff options
author | danielhanrahan <daniel.hanrahan@est.tech> | 2024-07-05 13:20:31 +0100 |
---|---|---|
committer | danielhanrahan <daniel.hanrahan@est.tech> | 2024-07-05 13:39:49 +0100 |
commit | 8b6882c68290520fe238562d0bd3739de61beaef (patch) | |
tree | a18a29be634ff9392f0c2b648076ad0a8e1b6fa6 /cps-ncmp-service/src/test | |
parent | c1c26ec8a97ce7de7d976665ae0c147fbf9ad80d (diff) |
[BUG] Fix handling of special characters in moduleSetTag
During CM-handle registration, moduleSetTag is sent as part of the
JSON request body when getting modules from DMI. However, it
incorrectly parses the moduleSetTag as JSON, instead of encoding to
JSON. This results in parsing errors when moduleSetTag includes
characters such as ':'
Issue-ID: CPS-2302
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: Ie38008e0effac2423a4d069a91587e47d8747d66
Diffstat (limited to 'cps-ncmp-service/src/test')
-rw-r--r-- | cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/inventory/sync/DmiModelOperationsSpec.groovy | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/inventory/sync/DmiModelOperationsSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/inventory/sync/DmiModelOperationsSpec.groovy index 1268bc7683..17352977b8 100644 --- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/inventory/sync/DmiModelOperationsSpec.groovy +++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/inventory/sync/DmiModelOperationsSpec.groovy @@ -170,9 +170,10 @@ class DmiModelOperationsSpec extends DmiOperationsBaseSpec { then: 'the result is the response from DMI service' assert result == [mod1:'some yang source'] where: 'the following Module Set Tags are used' - scenario | moduleSetTag || expectedModuleSetTagInRequest - 'Without module set tag' | '' || '' - 'With module set tag' | 'moduleSetTag1' || '"moduleSetTag":"moduleSetTag1",' + scenario | moduleSetTag || expectedModuleSetTagInRequest + 'Without module set tag' | '' || '' + 'With module set tag' | 'moduleSetTag1' || '"moduleSetTag":"moduleSetTag1",' + 'Special characters in module set tag' | 'module:set#tag$2' || '"moduleSetTag":"module:set#tag$2",' } def 'Retrieving yang resources from DMI with no module references.'() { |