aboutsummaryrefslogtreecommitdiffstats
path: root/generic-resource-api
diff options
context:
space:
mode:
authorprakash.e <prakash.e@huawei.com>2019-08-07 21:41:43 +0530
committerTimoney, Dan (dt5972) <dtimoney@att.com>2019-08-09 14:06:06 -0400
commit54fd31be9c46a26a735c4ee43470cbe225cffb4e (patch)
treef633dc194119f9873c598711a89330aa65671474 /generic-resource-api
parent8b309d6e6a73f2d16d699da2e63e886522085887 (diff)
Test case addition for SONAR coverage
Added new case for delete flow in PreloadVnfTopologyOperationRPCTest Change-Id: I6eac70c388523853e519626039bb6bfafc46bd77 Issue-ID: SDNC-840 Signed-off-by: Prakash.E <prakash.e@huawei.com>
Diffstat (limited to 'generic-resource-api')
-rw-r--r--generic-resource-api/client/pom.xml4
-rw-r--r--generic-resource-api/features/features-generic-resource-api/pom.xml4
-rw-r--r--generic-resource-api/features/pom.xml4
-rw-r--r--generic-resource-api/features/sdnc-generic-resource-api/pom.xml4
-rwxr-xr-xgeneric-resource-api/installer/pom.xml4
-rw-r--r--generic-resource-api/model/pom.xml4
-rw-r--r--generic-resource-api/pom.xml4
-rw-r--r--generic-resource-api/provider/pom.xml4
-rw-r--r--generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/PreloadVnfTopologyOperationRPCTest.java39
9 files changed, 55 insertions, 16 deletions
diff --git a/generic-resource-api/client/pom.xml b/generic-resource-api/client/pom.xml
index f38e6828..09e6d245 100644
--- a/generic-resource-api/client/pom.xml
+++ b/generic-resource-api/client/pom.xml
@@ -6,7 +6,7 @@
<packaging>jar</packaging>
<groupId>org.onap.sdnc.northbound</groupId>
<artifactId>generic-resource-api-client</artifactId>
- <version>1.6.1-SNAPSHOT</version>
+ <version>1.6.2-SNAPSHOT</version>
<name>sdnc-northbound :: generic-resource-api:: ${project.artifactId}</name>
<url>http://wiki.onap.org</url>
@@ -15,7 +15,7 @@
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>client-parent</artifactId>
- <version>1.3.2</version>
+ <version>1.3.3-SNAPSHOT</version>
</parent>
<dependencies>
diff --git a/generic-resource-api/features/features-generic-resource-api/pom.xml b/generic-resource-api/features/features-generic-resource-api/pom.xml
index 41d443d8..d3752234 100644
--- a/generic-resource-api/features/features-generic-resource-api/pom.xml
+++ b/generic-resource-api/features/features-generic-resource-api/pom.xml
@@ -5,13 +5,13 @@
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>feature-repo-parent</artifactId>
- <version>1.3.2</version>
+ <version>1.3.3-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>org.onap.sdnc.northbound</groupId>
<artifactId>features-generic-resource-api</artifactId>
- <version>1.6.1-SNAPSHOT</version>
+ <version>1.6.2-SNAPSHOT</version>
<packaging>feature</packaging>
<name>sdnc-northbound :: generic-resource-api :: ${project.artifactId}</name>
diff --git a/generic-resource-api/features/pom.xml b/generic-resource-api/features/pom.xml
index 41899946..23965789 100644
--- a/generic-resource-api/features/pom.xml
+++ b/generic-resource-api/features/pom.xml
@@ -5,13 +5,13 @@
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>1.3.2</version>
+ <version>1.3.3-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>org.onap.sdnc.northbound</groupId>
<artifactId>generic-resource-api-features</artifactId>
- <version>1.6.1-SNAPSHOT</version>
+ <version>1.6.2-SNAPSHOT</version>
<packaging>pom</packaging>
<name>sdnc-northbound :: generic-resource-api :: ${project.artifactId}</name>
diff --git a/generic-resource-api/features/sdnc-generic-resource-api/pom.xml b/generic-resource-api/features/sdnc-generic-resource-api/pom.xml
index bb9fc6cf..5a4eea97 100644
--- a/generic-resource-api/features/sdnc-generic-resource-api/pom.xml
+++ b/generic-resource-api/features/sdnc-generic-resource-api/pom.xml
@@ -5,13 +5,13 @@
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>1.3.2</version>
+ <version>1.3.3-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>org.onap.sdnc.northbound</groupId>
<artifactId>sdnc-generic-resource-api</artifactId>
- <version>1.6.1-SNAPSHOT</version>
+ <version>1.6.2-SNAPSHOT</version>
<packaging>feature</packaging>
<name>sdnc-northbound :: generic-resource-api :: ${project.artifactId}</name>
diff --git a/generic-resource-api/installer/pom.xml b/generic-resource-api/installer/pom.xml
index 6a175a6d..a7c8b369 100755
--- a/generic-resource-api/installer/pom.xml
+++ b/generic-resource-api/installer/pom.xml
@@ -5,13 +5,13 @@
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>1.3.2</version>
+ <version>1.3.3-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>org.onap.sdnc.northbound</groupId>
<artifactId>generic-resource-api-installer</artifactId>
- <version>1.6.1-SNAPSHOT</version>
+ <version>1.6.2-SNAPSHOT</version>
<packaging>pom</packaging>
<name>sdnc-northbound :: generic-resource-api :: ${project.artifactId}</name>
diff --git a/generic-resource-api/model/pom.xml b/generic-resource-api/model/pom.xml
index 5c48d14f..789c20b3 100644
--- a/generic-resource-api/model/pom.xml
+++ b/generic-resource-api/model/pom.xml
@@ -5,13 +5,13 @@
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>binding-parent</artifactId>
- <version>1.3.2</version>
+ <version>1.3.3-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>org.onap.sdnc.northbound</groupId>
<artifactId>generic-resource-api-model</artifactId>
- <version>1.6.1-SNAPSHOT</version>
+ <version>1.6.2-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>sdnc-northbound :: generic-resource-api :: ${project.artifactId}</name>
diff --git a/generic-resource-api/pom.xml b/generic-resource-api/pom.xml
index 0d24a1bb..deff8241 100644
--- a/generic-resource-api/pom.xml
+++ b/generic-resource-api/pom.xml
@@ -5,13 +5,13 @@
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>1.3.2</version>
+ <version>1.3.3-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>org.onap.sdnc.northbound</groupId>
<artifactId>generic-resource-api</artifactId>
- <version>1.6.1-SNAPSHOT</version>
+ <version>1.6.2-SNAPSHOT</version>
<packaging>pom</packaging>
<name>sdnc-northbound :: generic-resource-api</name>
diff --git a/generic-resource-api/provider/pom.xml b/generic-resource-api/provider/pom.xml
index 575853ec..2a6d50e4 100644
--- a/generic-resource-api/provider/pom.xml
+++ b/generic-resource-api/provider/pom.xml
@@ -5,13 +5,13 @@
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>binding-parent</artifactId>
- <version>1.3.2</version>
+ <version>1.3.3-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>org.onap.sdnc.northbound</groupId>
<artifactId>generic-resource-api-provider</artifactId>
- <version>1.6.1-SNAPSHOT</version>
+ <version>1.6.2-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>sdnc-northbound :: generic-resource-api :: ${project.artifactId}</name>
diff --git a/generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/PreloadVnfTopologyOperationRPCTest.java b/generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/PreloadVnfTopologyOperationRPCTest.java
index 8ab5e1f7..7f7ff821 100644
--- a/generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/PreloadVnfTopologyOperationRPCTest.java
+++ b/generic-resource-api/provider/src/test/java/org/onap/sdnc/northbound/PreloadVnfTopologyOperationRPCTest.java
@@ -215,6 +215,45 @@ public class PreloadVnfTopologyOperationRPCTest extends GenericResourceApiProvid
assertEquals(expectedOutput, output);
}
+
+ @Test
+ public void delete_complete_with_success_when_no_errors() throws Exception {
+
+ svcClient.mockHasGraph(true);
+ PropBuilder svcResultProp = svcClient.createExecuteOKResult();
+ svcClient.mockExecute(svcResultProp);
+
+ PreloadVfModuleTopologyOperationInput input = build(preloadVfModuleTopologyOperationInput()
+ .setPreloadVfModuleTopologyInformation(build(preloadVfModuleTopologyInformationBuilder()
+ .setVnfTopologyIdentifierStructure(build(vnfTopologyIdentifierStructureBuilder()
+ .setVnfName("test-vnf-name")
+ .setVnfType("test-vnf-type")))
+ .setVfModuleTopology(build(vfModuleTopologyBuilder()
+ .setVfModuleTopologyIdentifier(build(vfModuleTopologyIdentifierBuilder()
+ .setVfModuleName("vf-module-name"))
+ )))))
+ .setSdncRequestHeader(build(sdncRequestHeader()
+ .setSvcRequestId("test-svc-request-id")
+ .setSvcAction(SvcAction.Delete)
+ ))
+ .setRequestInformation(build(requestInformation()
+ .setRequestId("test-request-id")
+ .setRequestAction(RequestInformation.RequestAction.DeleteServiceInstance)
+ ))
+ );
+
+ PreloadVfModuleTopologyOperationOutput output =
+ exec(genericResourceApiProvider::preloadVfModuleTopologyOperation, input, RpcResult::getResult);
+
+ assertEquals("200", output.getResponseCode());
+ assertEquals("Y", output.getAckFinalIndicator());
+
+ PreloadVfModuleTopologyOperationOutput expectedOutput = createExpectedOutput(svcResultProp, input);
+ assertEquals(expectedOutput, output);
+ }
+
+
+
private PreloadVfModuleTopologyOperationOutput createExpectedOutput(PropBuilder svcResultProp,
PreloadVfModuleTopologyOperationInput input) {
return build(preloadVfModuleTopologyOperationOutput()