aboutsummaryrefslogtreecommitdiffstats
path: root/intentanalysis/src/test
diff options
context:
space:
mode:
authorzhangfan345 <zhangfan345@huawei.com>2022-10-18 10:33:05 +0800
committerKeguang He <hekeguang@chinamobile.com>2022-10-20 10:25:42 +0000
commitb1f0ad27fb55dd1dcc79596d4078d1cdc4b465cd (patch)
treedea818f4db6349b0b71f1cfc672cfa6a66992c3f /intentanalysis/src/test
parent8a2a118322360203bf25769c1566a2c07c0b85ad (diff)
Fix bugs of policy adapters.
Issue-ID: USECASEUI-741 Signed-off-by: zhangfan345 <zhangfan345@huawei.com> Change-Id: Ic57e04f1cd94f4d0767e2c4563654821d65fc10c
Diffstat (limited to 'intentanalysis/src/test')
-rw-r--r--intentanalysis/src/test/java/org/onap/usecaseui/intentanalysis/adapters/policy/PolicyServiceTest.java10
-rw-r--r--intentanalysis/src/test/resources/intentdb-test-data.sql4
2 files changed, 7 insertions, 7 deletions
diff --git a/intentanalysis/src/test/java/org/onap/usecaseui/intentanalysis/adapters/policy/PolicyServiceTest.java b/intentanalysis/src/test/java/org/onap/usecaseui/intentanalysis/adapters/policy/PolicyServiceTest.java
index ea253e7..2f9cf20 100644
--- a/intentanalysis/src/test/java/org/onap/usecaseui/intentanalysis/adapters/policy/PolicyServiceTest.java
+++ b/intentanalysis/src/test/java/org/onap/usecaseui/intentanalysis/adapters/policy/PolicyServiceTest.java
@@ -101,35 +101,35 @@ public class PolicyServiceTest {
@Test
public void testUpdateIntentConfigPolicySuccess() throws IOException {
mockUpPolicyApiCall(0);
- boolean result = policyService.updateIntentConfigPolicy("testCLLID", "1000", true);
+ boolean result = policyService.updateIntentConfigPolicy("testCLLID", "1000", "true");
Assert.assertTrue(result);
}
@Test
public void testUpdateIntentConfigPolicySuccessPolicyNotExist(){
mockUpPolicyApiCall(QUERY_POLICY_NOT_EXIST);
- boolean result = policyService.updateIntentConfigPolicy("testCLLID", "1000", true);
+ boolean result = policyService.updateIntentConfigPolicy("testCLLID", "1000", "true");
Assert.assertTrue(result);
}
@Test
public void testUpdateIntentConfigPolicyFailedCreatePolicyTypeFailed(){
mockUpPolicyApiCall(CREATE_POLICY_TYPE_FAILED);
- boolean result = policyService.updateIntentConfigPolicy("testCLLID", "1000", true);
+ boolean result = policyService.updateIntentConfigPolicy("testCLLID", "1000", "true");
Assert.assertFalse(result);
}
@Test
public void testUpdateIntentConfigPolicyFailedCreatePolicyFailed(){
mockUpPolicyApiCall(CREATE_POLICY_FAILED);
- boolean result = policyService.updateIntentConfigPolicy("testCLLID", "1000", true);
+ boolean result = policyService.updateIntentConfigPolicy("testCLLID", "1000", "true");
Assert.assertFalse(result);
}
@Test
public void testUpdateIntentConfigPolicyFailedDeployPolicyFailed(){
mockUpPolicyApiCall(DEPLOY_POLICY_FAILED);
- boolean result = policyService.updateIntentConfigPolicy("testCLLID", "1000", true);
+ boolean result = policyService.updateIntentConfigPolicy("testCLLID", "1000", "true");
Assert.assertFalse(result);
}
diff --git a/intentanalysis/src/test/resources/intentdb-test-data.sql b/intentanalysis/src/test/resources/intentdb-test-data.sql
index 78f4d1e..4a1f120 100644
--- a/intentanalysis/src/test/resources/intentdb-test-data.sql
+++ b/intentanalysis/src/test/resources/intentdb-test-data.sql
@@ -106,10 +106,10 @@ values ('intentId2', 'NOT_FULFILLED', 'COMPLIANT', 'NotFulfilledReason');
-- Records of intent_management_function_reg_info
-- ----------------------------
INSERT INTO intent_management_function_reg_info(imfr_info_id,imfr_info_description,support_area,support_model,support_interfaces,handle_name,intent_function_type)
-VALUES ('CLLBusinessId','CLLBusiness','CLLBUSINESS',null,'CREATE,DELETE,UPDATE,SEARCH}','CLLBusinessIntentManagementFunction','INTERNALFUNCTION');
+VALUES ('CLLBusinessId','CLLBusiness','CLLBUSINESS',null,'CREATE,DELETE,UPDATE,SEARCH','CLLBusinessIntentManagementFunction','INTERNALFUNCTION');
INSERT INTO intent_management_function_reg_info(imfr_info_id,imfr_info_description,support_area,support_model,support_interfaces,handle_name,intent_function_type)
-VALUES ('CLLDeliveryId','CLLDelivery','CLLBUSINESS,DELIVERY',null,'CREATE,DELETE,UPDATE,SEARCH}','CLLDeliveryIntentManagementFunction','INTERNALFUNCTION');
+VALUES ('CLLDeliveryId','CLLDelivery','CLLBUSINESS,DELIVERY',null,'CREATE,DELETE,UPDATE,SEARCH','CLLDeliveryIntentManagementFunction','INTERNALFUNCTION');
INSERT INTO intent_management_function_reg_info(imfr_info_id,imfr_info_description,support_area,support_model,support_interfaces,handle_name,intent_function_type)
VALUES ('CLLAssuranceId','CLLAssurance','CLLBUSINESS,ASSURANCE',null,'CREATE,DELETE,UPDATE,SEARCH','CLLAssuranceIntentManagementFunction','INTERNALFUNCTION'); \ No newline at end of file