From: Joseph Keenan Date: Wed, 22 Jun 2022 09:16:56 +0000 (+0000) Subject: Merge "Eliminate cmhandle-properties tag" X-Git-Tag: 3.1.0~95 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=31cf29d21096ab7200658f586ecb9e40ee72249e;hp=b000d8915b371724869195ba0889f7082eecc9f1;p=cps.git Merge "Eliminate cmhandle-properties tag" --- diff --git a/cps-ncmp-events/src/main/resources/schemas/ncmp-event-schema-v1.json b/cps-ncmp-events/src/main/resources/schemas/ncmp-event-schema-v1.json index 4ddffea56..05a0e93b3 100644 --- a/cps-ncmp-events/src/main/resources/schemas/ncmp-event-schema-v1.json +++ b/cps-ncmp-events/src/main/resources/schemas/ncmp-event-schema-v1.json @@ -72,6 +72,7 @@ "cmhandle-properties": { "description": "cmHandle properties as json object.", "type": "object", + "default": null, "existingJavaType": "java.util.List>", "additionalProperties": false } diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/event/NcmpEventsCreatorSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/event/NcmpEventsCreatorSpec.groovy index 04eb0bf2b..ae38714e2 100644 --- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/event/NcmpEventsCreatorSpec.groovy +++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/event/NcmpEventsCreatorSpec.groovy @@ -45,8 +45,8 @@ class NcmpEventsCreatorSpec extends Specification { assert result.eventCorrelationId == cmHandleId and: 'event payload is mapped correctly' assert result.event.operation == operation - assert result.event.cmhandleProperties.size() == cmHandlePropertiesListSize - assert result.event.cmhandleProperties[0] == cmHandleProperties + assert (result.event.cmhandleProperties != null) ? result.event.cmhandleProperties.size() : 0 == cmHandlePropertiesListSize + assert (result.event.cmhandleProperties != null) ? result.event.cmhandleProperties[0] : null == cmHandleProperties where: 'the following operations are used' operation | cmHandlePropertiesListSize | cmHandleProperties CREATE | 1 | ['publicProperty1': 'value1', 'publicProperty2': 'value2']