From c1964774cbfd4563ca237ec3f08349ed6d5048f4 Mon Sep 17 00:00:00 2001 From: mpriyank Date: Mon, 27 May 2024 13:33:36 +0100 Subject: CmDataSubscription status code update - Removing the unused NcmpRespnseStatus internal codes and messages - Introducing statusCode 1 for ACCEPTED and 104 for REJECTED of CmSubscription - Added check for status code and message both in the flow Issue-ID: CPS-2238 Change-Id: Id99f099a398392dbef1504f9d7c658665d163902 Signed-off-by: mpriyank --- .../CmNotificationSubscriptionDmiOutEventConsumerSpec.groovy | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'cps-ncmp-service/src/test/groovy') diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/events/cmsubscription/CmNotificationSubscriptionDmiOutEventConsumerSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/events/cmsubscription/CmNotificationSubscriptionDmiOutEventConsumerSpec.groovy index 488879db7a..9b0a48d93e 100644 --- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/events/cmsubscription/CmNotificationSubscriptionDmiOutEventConsumerSpec.groovy +++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/events/cmsubscription/CmNotificationSubscriptionDmiOutEventConsumerSpec.groovy @@ -36,7 +36,6 @@ import org.onap.cps.ncmp.events.cmnotificationsubscription_merge1_0_0.dmi_to_ncm import org.onap.cps.ncmp.utils.TestUtils import org.onap.cps.utils.JsonObjectMapper import org.slf4j.LoggerFactory -import org.spockframework.spring.SpringBean import org.springframework.beans.factory.annotation.Autowired import org.springframework.boot.test.context.SpringBootTest @@ -108,9 +107,9 @@ class CmNotificationSubscriptionDmiOutEventConsumerSpec extends MessagingBaseSpe and: 'correct number of calls to publish the ncmp out event to client' 1 * mockCmNotificationSubscriptionEventsHandler.publishCmNotificationSubscriptionNcmpOutEvent('sub-1', 'subscriptionCreateResponse', _, false) where: 'the following parameters are used' - scenario | subscriptionStatus | statusCode || expectedCacheCalls | expectedPersistenceCalls - 'Accepted Status' | CmNotificationSubscriptionStatus.ACCEPTED | '1' || 1 | 1 - 'Rejected Status' | CmNotificationSubscriptionStatus.REJECTED | '2' || 1 | 0 + scenario | subscriptionStatus | statusCode || expectedCacheCalls | expectedPersistenceCalls + 'Accepted Status' | CmNotificationSubscriptionStatus.ACCEPTED | '1' || 1 | 1 + 'Rejected Status' | CmNotificationSubscriptionStatus.REJECTED | '104' || 1 | 0 } def getLoggingEvent() { -- cgit 1.2.3-korg