diff options
author | Julien Fontaine <julien.fontaine@bell.ca> | 2021-03-02 18:18:30 -0500 |
---|---|---|
committer | KAPIL SINGAL <ks220y@att.com> | 2021-03-09 18:20:18 +0000 |
commit | dc8d648fa7b642ca88c7b101ceb8188b5c5ed3e3 (patch) | |
tree | 5c95def0affe180dd1bb78e99511b6f6bbb1de33 /ms/blueprintsprocessor/functions/config-snapshots/src/test | |
parent | ae01a98c93de3303ef9f0e1e83d0505bb8a1d12b (diff) |
Add delete endpoint for config snapshot API
Add delete endpoint to delete config-snapshots based on resource-type, resource-id and resources-status.
Issue-ID: CCSDK-3205
Signed-off-by: Julien Fontaine <julien.fontaine@bell.ca>
Change-Id: Id7954694bc93beba08a79139834cb6477cb8e44b
Diffstat (limited to 'ms/blueprintsprocessor/functions/config-snapshots/src/test')
-rw-r--r-- | ms/blueprintsprocessor/functions/config-snapshots/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshotServiceTest.kt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ms/blueprintsprocessor/functions/config-snapshots/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshotServiceTest.kt b/ms/blueprintsprocessor/functions/config-snapshots/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshotServiceTest.kt index f25b6f9c7..403f92bc9 100644 --- a/ms/blueprintsprocessor/functions/config-snapshots/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshotServiceTest.kt +++ b/ms/blueprintsprocessor/functions/config-snapshots/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/config/snapshots/db/ResourceConfigSnapshotServiceTest.kt @@ -78,4 +78,17 @@ class ResourceConfigSnapshotServiceTest { assertEquals(tr, res) } } + + @Test + fun deleteResourceConfigSnapshot() { + runBlocking { + every { + cfgRepository.deleteByResourceIdAndResourceTypeAndStatus(any(), any(), any()) + } returns Unit + cfgService.deleteByResourceIdAndResourceTypeAndStatus(resourceId, resourceType, resourceStatus) + verify { + cfgRepository.deleteByResourceIdAndResourceTypeAndStatus(eq(resourceId), eq(resourceType), eq(resourceStatus)) + } + } + } } |