aboutsummaryrefslogtreecommitdiffstats
path: root/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso
diff options
context:
space:
mode:
authorSeshu Kumar M <seshu.kumar.m@huawei.com>2018-03-28 23:09:08 +0000
committerGerrit Code Review <gerrit@onap.org>2018-03-28 23:09:08 +0000
commit6f025dbcb86fe48f83c2a3214d0db3d4dcb13bbd (patch)
treea674e6fb709534435d478eeabb32392090bf50b2 /mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso
parent406b20cb001cd435cc4fe263b24c8bca453248da (diff)
parentafd33b8c79d2efd61aaead30a5c83130808903d5 (diff)
Merge "MSO API Handler Infra test repair"
Diffstat (limited to 'mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso')
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/ServiceInstanceTest.java17
1 files changed, 4 insertions, 13 deletions
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/ServiceInstanceTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/ServiceInstanceTest.java
index d8996a98b6..28cb51aa70 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/ServiceInstanceTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/ServiceInstanceTest.java
@@ -99,7 +99,6 @@ public class ServiceInstanceTest {
"Locked instance - This service (testService) already has a request being worked with a status of null (RequestId - null). The existing request must finish or be cleaned up before proceeding."));
}
- @Ignore // 1802 merge
@Test
public void createServiceInstanceTestDBException(){
new MockUp<RequestsDatabase>() {
@@ -134,7 +133,7 @@ public class ServiceInstanceTest {
+ "\"requestDetails\": {\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"zz9999\",\"instanceName\": \"testService\"},\"requestParameters\": { \"autoBuildVfModules\": false,\"subscriptionServiceType\": \"test\"},\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\"}}}";
Response resp = instance.createServiceInstance(requestJson, "v2");
String respBody = resp.getEntity().toString();
- assertTrue(respBody.contains("Exception while creating record in DB null"));
+ assertTrue(respBody.contains("Exception while creating record in DB") && respBody.contains("NullPointerException"));
}
@Ignore // 1802 merge
@@ -179,10 +178,9 @@ public class ServiceInstanceTest {
+ "\"requestDetails\": {\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"zz9999\",\"instanceName\": \"testService\"},\"requestParameters\": { \"autoBuildVfModules\": false,\"subscriptionServiceType\": \"test\"},\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\"}}}";
Response resp = instance.createServiceInstance(requestJson, "v2");
String respBody = resp.getEntity().toString();
- assertTrue(respBody.contains("Failed calling bpmn properties"));
+ assertTrue(respBody.contains("Failed calling bpmn properties")); // was: Request Failed due to BPEL error
}
- @Ignore // 1802 merge
@Test(expected = Exception.class)
public void createServiceInstanceTest200Http(){
new MockUp<RequestsDatabase>() {
@@ -253,7 +251,6 @@ public class ServiceInstanceTest {
String respBody = resp.getEntity().toString();
}
- @Ignore // 1802 merge
@Test
public void createServiceInstanceTest500Http(){
new MockUp<RequestsDatabase>() {
@@ -396,7 +393,6 @@ public class ServiceInstanceTest {
assertTrue(respBody.contains("No valid modelVersionId is specified"));
}
- @Ignore // 1802 merge
@Test
public void createServiceInstanceTestNullHttpResp(){
new MockUp<RequestsDatabase>() {
@@ -592,7 +588,7 @@ public class ServiceInstanceTest {
+"\"networkInstanceId\":\"1882937\","
+"\"volumeGroupInstanceId\":\"1882935\","
+"\"vfModuleInstanceId\":\"1882934\","
- + "\"requestDetails\": {\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"zz9999\"},\"requestParameters\": { \"autoBuildVfModules\": false},\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\"}}}";
+ + "\"requestDetails\": {\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"zz9999\"},\"requestParameters\": { \"autoBuildVfModules\": false,\"subscriptionServiceType\":\"test\"},\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\"}}}";
Response resp = instance.createServiceInstance(requestJson, "v2");
String respBody = resp.getEntity().toString();
assertTrue(respBody.contains("Error parsing request.") && respBody.contains("No valid modelName is specified"));
@@ -607,7 +603,7 @@ public class ServiceInstanceTest {
+"\"networkInstanceId\":\"1882937\","
+"\"volumeGroupInstanceId\":\"1882935\","
+"\"vfModuleInstanceId\":\"1882934\","
- + "\"requestDetails\": {\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"zz9999\"},\"requestParameters\": { \"autoBuildVfModules\": true},\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\"}}}";
+ + "\"requestDetails\": {\"requestInfo\": { \"source\": \"VID\", \"requestorId\": \"zz9999\"},\"requestParameters\": { \"autoBuildVfModules\": true,\"subscriptionServiceType\":\"test\"},\"modelInfo\":{\"modelInvariantId\": \"557ea944-c83e-43cf-9ed7-3a354abd6d34\",\"modelVersion\":\"v2\",\"modelType\":\"service\",\"modelName\":\"serviceModel\"}}}";
Response resp = instance.createServiceInstance(requestJson, "v2");
String respBody = resp.getEntity().toString();
assertTrue(respBody.contains("Error parsing request.") && respBody.contains("AutoBuildVfModule is not valid in the v2 version"));
@@ -689,7 +685,6 @@ public class ServiceInstanceTest {
assertTrue(respStr.contains("Error parsing request.") && respStr.contains("No valid serviceInstanceId matching the serviceInstanceId in request URI is specified"));
}
- @Ignore // 1802 merge
@Test
public void activateServiceInstanceTestNormal(){
ServiceInstances instance = new ServiceInstances();
@@ -743,7 +738,6 @@ public class ServiceInstanceTest {
assertTrue(respStr.contains("Error parsing request.") && respStr.contains("No valid serviceInstanceId matching the serviceInstanceId in request URI is specified"));
}
- @Ignore // 1802 merge
@Test
public void deactivateServiceInstanceTestNormal(){
ServiceInstances instance = new ServiceInstances();
@@ -797,7 +791,6 @@ public class ServiceInstanceTest {
assertTrue(respStr.contains("Error parsing request.") && respStr.contains("No valid modelVersionId is specified"));
}
- @Ignore // 1802 merge
@Test
public void deleteServiceInstanceTestNormal(){
ServiceInstances instance = new ServiceInstances();
@@ -961,7 +954,6 @@ public class ServiceInstanceTest {
}
/*** Replace Vnf Instance Test Cases ***/
- @Ignore
@Test
public void replaceVNFInstanceTestNormal(){
ServiceInstances instance = new ServiceInstances();
@@ -996,7 +988,6 @@ public class ServiceInstanceTest {
/*** Update Vnf Instance Test Cases ***/
- @Ignore
@Test
public void deleteVNFInstanceTestNormal(){
ServiceInstances instance = new ServiceInstances();