aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeshu Kumar M <seshu.kumar.m@huawei.com>2017-09-20 09:45:06 +0000
committerGerrit Code Review <gerrit@onap.org>2017-09-20 09:45:06 +0000
commit053fe5f99df4e36c1541835c2b5f68c7e1f65064 (patch)
treee51f5f68d52fdf43dddf1265d768e5e04953fbc7
parentaf88607b763d9884e6d422ddae5da17376d24d26 (diff)
parent40e54a87c9fa77d4efc0ee0cacc6868b31caea15 (diff)
Merge "Add Query Job API UT"
-rw-r--r--adapters/mso-vfc-adapter/src/test/java/org/openecomp/mso/adapters/vfc/VfcAdapterTest.java5
-rw-r--r--adapters/mso-vfc-adapter/src/test/resources/json/queryJobReq.json2
2 files changed, 6 insertions, 1 deletions
diff --git a/adapters/mso-vfc-adapter/src/test/java/org/openecomp/mso/adapters/vfc/VfcAdapterTest.java b/adapters/mso-vfc-adapter/src/test/java/org/openecomp/mso/adapters/vfc/VfcAdapterTest.java
index f17c7215cf..4dc8fffdc6 100644
--- a/adapters/mso-vfc-adapter/src/test/java/org/openecomp/mso/adapters/vfc/VfcAdapterTest.java
+++ b/adapters/mso-vfc-adapter/src/test/java/org/openecomp/mso/adapters/vfc/VfcAdapterTest.java
@@ -103,6 +103,8 @@ public class VfcAdapterTest {
return getResponse(null);
} else if(url.contains("terminate") && methodType.equals(CommonConstant.MethodType.POST)) {
return getResponse("terminateNsRsp.json");
+ } else if(url.contains("/api/nslcm/v1/jobs") && methodType.equals(CommonConstant.MethodType.GET)) {
+ return getResponse("queryJobRsp.json");
}
else {
return null;
@@ -202,7 +204,8 @@ public class VfcAdapterTest {
@Test
public void queryJobTest() {
-
+ mockRestfulUtil(FILE_PATH + "queryJobReq.json");
+ vfcAdapter.queryNfvoJobStatus(null, "1");
}
/**
diff --git a/adapters/mso-vfc-adapter/src/test/resources/json/queryJobReq.json b/adapters/mso-vfc-adapter/src/test/resources/json/queryJobReq.json
index 4f7c29f9d0..ac095e6aa3 100644
--- a/adapters/mso-vfc-adapter/src/test/resources/json/queryJobReq.json
+++ b/adapters/mso-vfc-adapter/src/test/resources/json/queryJobReq.json
@@ -1,4 +1,6 @@
{
+ "globalSubscriberId":"9b9f02c0-298b-458a-bc9c-be3692e4f350",
+ "serviceType":"service",
"serviceId":"9b9f02c0-298b-458a-bc9c-be3692e4f351",
"operationId":"9b9f02c0-298b-458a-bc9c-be3692e4f352",
"nodeTemplateUUID":"9b9f02c0-298b-458a-bc9c-be3692e4f353"