aboutsummaryrefslogtreecommitdiffstats
path: root/cps-ncmp-rest
diff options
context:
space:
mode:
authorToine Siebelink <toine.siebelink@est.tech>2023-09-21 08:57:40 +0000
committerGerrit Code Review <gerrit@onap.org>2023-09-21 08:57:40 +0000
commit0af82141cb75a04a16248e17d4e915a580e82300 (patch)
tree9b750f83e4bd977b8039a12f2ae129d364cf665d /cps-ncmp-rest
parent56384d1ae24b231ed1537c1a551270ef0f69c445 (diff)
parente5cdeae638105b2a3a191fc2273c63d73ff8503c (diff)
Merge "Set lock state and reason upon request"
Diffstat (limited to 'cps-ncmp-rest')
-rw-r--r--cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/NetworkCmProxyControllerSpec.groovy2
-rw-r--r--cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/mapper/CmHandleStateMapperSpec.groovy8
2 files changed, 5 insertions, 5 deletions
diff --git a/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/NetworkCmProxyControllerSpec.groovy b/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/NetworkCmProxyControllerSpec.groovy
index 7964e32b6f..6887d1974f 100644
--- a/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/NetworkCmProxyControllerSpec.groovy
+++ b/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/NetworkCmProxyControllerSpec.groovy
@@ -600,7 +600,7 @@ class NetworkCmProxyControllerSpec extends Specification {
def compositeStateTestObject() {
new CompositeState(cmHandleState: CmHandleState.ADVISED,
- lockReason: CompositeState.LockReason.builder().lockReasonCategory(LockReasonCategory.LOCKED_MODULE_SYNC_FAILED).details("lock details").build(),
+ lockReason: CompositeState.LockReason.builder().lockReasonCategory(LockReasonCategory.MODULE_SYNC_FAILED).details("lock details").build(),
lastUpdateTime: formattedDateAndTime.toString(),
dataSyncEnabled: false,
dataStores: dataStores())
diff --git a/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/mapper/CmHandleStateMapperSpec.groovy b/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/mapper/CmHandleStateMapperSpec.groovy
index 9a09b97973..bc9ea80bd2 100644
--- a/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/mapper/CmHandleStateMapperSpec.groovy
+++ b/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/mapper/CmHandleStateMapperSpec.groovy
@@ -43,7 +43,7 @@ class CmHandleStateMapperSpec extends Specification {
def compositeState = new CompositeStateBuilder()
.withCmHandleState(CmHandleState.ADVISED)
.withLastUpdatedTime(formattedDateAndTime.toString())
- .withLockReason(LockReasonCategory.LOCKED_MODULE_SYNC_FAILED, 'locked details')
+ .withLockReason(LockReasonCategory.MODULE_SYNC_FAILED, 'locked details')
.withOperationalDataStores(DataStoreSyncState.SYNCHRONIZED, formattedDateAndTime).build()
compositeState.setDataSyncEnabled(false)
when: 'mapper is called'
@@ -74,9 +74,9 @@ class CmHandleStateMapperSpec extends Specification {
then: 'the composite state contains the expected lock Reason and details'
result.getLockReason().getReason() == expectedExternalLockReason
where:
- scenario | lockReason || expectedExternalLockReason
- 'LOCKED_MODULE_SYNC_FAILED' | LockReasonCategory.LOCKED_MODULE_SYNC_FAILED || 'LOCKED_MISBEHAVING'
- 'null value' | null || null
+ scenario | lockReason || expectedExternalLockReason
+ 'MODULE_SYNC_FAILED' | LockReasonCategory.MODULE_SYNC_FAILED || 'LOCKED_MISBEHAVING'
+ 'null value' | null || null
}
}