diff options
author | Sandeep J <sandeejh@in.ibm.com> | 2019-01-24 14:54:06 +0530 |
---|---|---|
committer | Takamune Cho <takamune.cho@att.com> | 2019-01-24 19:38:22 +0000 |
commit | 2cf3a78839c51b9de01c70f1b561b1bd059d0f69 (patch) | |
tree | 11ae823bf6a39da1afb9eb24bf919ec3ea40432c /appc-config/appc-data-services/provider/src/test | |
parent | 77156eecf1a19cd32c7b4111e9cc7cddc3daa7fb (diff) |
added test case to TestDGGeneralDBService.java
to increase code coverage
Issue-ID: APPC-1086
Change-Id: Icc459b97d2b15e204c3002a237752af9fe34cb20
Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
Diffstat (limited to 'appc-config/appc-data-services/provider/src/test')
-rw-r--r-- | appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/db/TestDGGeneralDBService.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/db/TestDGGeneralDBService.java b/appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/db/TestDGGeneralDBService.java index e8c42b7e0..97809616b 100644 --- a/appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/db/TestDGGeneralDBService.java +++ b/appc-config/appc-data-services/provider/src/test/java/org/onap/appc/data/services/db/TestDGGeneralDBService.java @@ -319,4 +319,23 @@ public class TestDGGeneralDBService { dbService.cleanContextPropertyByPrefix(ctx, "test"); assertEquals(2,ctx.getAttributeKeySet().size()); } + + @Test + public void testSaveUploadConfig() throws SvcLogicException + { + SvcLogicContext ctx = new SvcLogicContext(); + ctx.setAttribute("request-id", "test"); + ctx.setAttribute("request-action", "Configure"); + ctx.setAttribute("originator-id", "test"); + ctx.setAttribute("vnf-id", "test"); + ctx.setAttribute("vm-name", "test"); + ctx.setAttribute("vnf-host-ip-address", "10.0.0.1"); + ctx.setAttribute("vnf-type", "test"); + ctx.setAttribute("vnfc-type", "test"); + ctx.setAttribute("tmp.escaped.devicerunningconfig", "10.0.0.1"); + + MockDGGeneralDBService dbService = MockDGGeneralDBService.initialise(); + QueryStatus status= dbService.saveUploadConfig(ctx, "test"); + assertEquals(QueryStatus.SUCCESS, status); + } } |