X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=cps-ncmp-service%2Fsrc%2Ftest%2Fgroovy%2Forg%2Fonap%2Fcps%2Fncmp%2Fapi%2Finventory%2Fsync%2FModuleSyncWatchdogSpec.groovy;fp=cps-ncmp-service%2Fsrc%2Ftest%2Fgroovy%2Forg%2Fonap%2Fcps%2Fncmp%2Fapi%2Finventory%2Fsync%2FModuleSyncSpec.groovy;h=b7eb133bf0820fb3926b053da663cae4e202d04b;hb=884a5a0e8bf08cc47e0e0dbd7e20558212ca82b1;hp=0f89a428b4e5bf8e05f8f3dba8cd7360b02868e7;hpb=02082984687fd6e7c49d23bc1001f882c68b4ebb;p=cps.git diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/inventory/sync/ModuleSyncSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/inventory/sync/ModuleSyncWatchdogSpec.groovy similarity index 96% rename from cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/inventory/sync/ModuleSyncSpec.groovy rename to cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/inventory/sync/ModuleSyncWatchdogSpec.groovy index 0f89a428b..b7eb133bf 100644 --- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/inventory/sync/ModuleSyncSpec.groovy +++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/inventory/sync/ModuleSyncWatchdogSpec.groovy @@ -29,7 +29,7 @@ import org.onap.cps.ncmp.api.inventory.LockReasonCategory import org.onap.cps.ncmp.api.inventory.CompositeStateBuilder import spock.lang.Specification -class ModuleSyncSpec extends Specification { +class ModuleSyncWatchdogSpec extends Specification { def mockInventoryPersistence = Mock(InventoryPersistence) @@ -53,6 +53,8 @@ class ModuleSyncSpec extends Specification { objectUnderTest.executeAdvisedCmHandlePoll() then: 'the inventory persistence cm handle returns a composite state for the first cm handle' 1 * mockInventoryPersistence.getCmHandleState('some-cm-handle') >> compositeState1 + and: 'module sync service deletes schema set of cm handle if it exists' + 1 * mockModuleSyncService.deleteSchemaSetIfExists(yangModelCmHandle1) and: 'module sync service syncs the first cm handle and creates a schema set' 1 * mockModuleSyncService.syncAndCreateSchemaSetAndAnchor(yangModelCmHandle1) and: 'the composite state cm handle state is now READY'