New TC_CSE_DMR_UPD_004_ACP_PVS_PV_LBL added into IN and MN profile

Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parent f31bcc69
......@@ -215,7 +215,7 @@ module OneM2M_TestControl_IN_profile {
if(true) {execute (TC_CSE_DMR_UPD_001_ACP_LBL());}
if(PICS_ACP_LBL) {execute (TC_CSE_DMR_UPD_002_ACP_LBL());}
if(PICS_ACP_LBL) {execute (TC_CSE_DMR_UPD_003_ACP_LBL());}
if(PICS_ACP_AT and PICS_ACP_LBL) {execute (TC_CSE_DMR_UPD_004_ACP_PV_AT_LBL());}
if(PICS_ACP_LBL) {execute (TC_CSE_DMR_UPD_004_ACP_PVS_PV_LBL());}
if(true) {execute (TC_CSE_DMR_UPD_007_ACP_CT());}
if(true) {execute (TC_CSE_DMR_UPD_008_ACP_PVS());}
if(true) {execute (TC_CSE_DMR_UPD_009_ACP_EXC());}
......
......@@ -238,7 +238,7 @@ module OneM2M_TestControl_MN_profile {
if(true) {execute (TC_CSE_DMR_UPD_001_ACP_LBL());}
if(PICS_ACP_LBL) {execute (TC_CSE_DMR_UPD_002_ACP_LBL());}
if(PICS_ACP_LBL) {execute (TC_CSE_DMR_UPD_003_ACP_LBL());}
if(true) {execute (TC_CSE_DMR_UPD_004_ACP_PV_AT_LBL());}
if(PICS_ACP_LBL) {execute (TC_CSE_DMR_UPD_004_ACP_PVS_PV_LBL());}
if(true) {execute (TC_CSE_DMR_UPD_007_ACP_CT());}
if(true) {execute (TC_CSE_DMR_UPD_008_ACP_PVS());}
if(true) {execute (TC_CSE_DMR_UPD_009_ACP_EXC());}
......
......@@ -5034,6 +5034,70 @@ module OneM2M_Testcases_CSE_Release_1 {
}
}
testcase TC_CSE_DMR_UPD_004_ACP_PVS_PV_LBL() runs on Tester system CseSystem {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var Labels v_labels_1 := {"VALUE_1"};
var Labels v_labels_2 := {"To be deleted"};
var SetOfAcrs v_privileges_1 := {accessControlRule_list := {valueof(m_createAcr({"all"}, int63))}};
var SetOfAcrs v_selfprivileges_2 := {accessControlRule_list := {valueof(m_createAcr({"all"}, int62))}};
var AttributeAux_list v_nullFields;
var template RequestPrimitive v_createRequest := m_createAcpBase;// privileges set by default to 63 for *
var template RequestPrimitive v_updateRequest := m_updateAcpBase;
var ResponsePrimitive v_responsePrimitive;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_createRequest.primitiveContent.accessControlPolicy.labels := v_labels_1;//Attribute 3
v_createRequest.primitiveContent.accessControlPolicy.privileges.accessControlRule_list := {};//Attribute 2
v_updateRequest.primitiveContent.accessControlPolicy.selfPrivileges := v_selfprivileges_2; //Attribute 1
v_updateRequest.primitiveContent.accessControlPolicy.privileges := v_privileges_1;//Attribute 2
v_updateRequest.primitiveContent.accessControlPolicy.labels := v_labels_2;//Attribute 3
v_nullFields := {{"labels", omit}};
v_ae1.start(f_CSE_DMR_UPD_004(int1, v_createRequest, v_updateRequest, v_nullFields));//AccessControlPolicy
v_ae1.done;
if(getverdict == pass){ v_responsePrimitive := f_getResponsePrimitive(v_ae1);
if(ispresent(v_responsePrimitive.primitiveContent)) {
if(ischosen(v_responsePrimitive.primitiveContent.accessControlPolicy)) {
//Check attribute 1
if(not match(v_responsePrimitive.primitiveContent.accessControlPolicy.selfPrivileges.accessControlRule_list[0].accessControlOperations, v_selfprivileges_2.accessControlRule_list[0].accessControlOperations)){
setverdict(fail, __SCOPE__ & ": Error: SelfPrivileges attribute not updated correctly")
}
//Check attribute 2
if(not match(v_responsePrimitive.primitiveContent.accessControlPolicy.privileges, valueof(v_updateRequest.primitiveContent.accessControlPolicy.privileges))){
setverdict(fail, __SCOPE__ & ": Error: Privileges attribute not added correctly")
}
//Check attribute 3
if(ispresent(v_responsePrimitive.primitiveContent.accessControlPolicy.labels)){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not deleted correctly")
}
}
}
v_primitiveContentRetrieveResource := f_getPrimitiveContentRetrievedResource(v_ae1);
//Check that the resource has been udpated correctly
if(ischosen(v_primitiveContentRetrieveResource.accessControlPolicy)) {
//Check attribute 1
if(not match (v_primitiveContentRetrieveResource.accessControlPolicy.selfPrivileges.accessControlRule_list[0].accessControlOperations, v_selfprivileges_2.accessControlRule_list[0].accessControlOperations)){
setverdict(fail, __SCOPE__ & ": Error: SelfPrivileges attribute not updated correctly")
}
//Check attribute 2
if(not match (v_primitiveContentRetrieveResource.accessControlPolicy.privileges, valueof(v_updateRequest.primitiveContent.accessControlPolicy.privileges))){
setverdict(fail, __SCOPE__ & ": Error: Privileges attribute not added correctly")
}
//Check attribute 3
if(ispresent(v_primitiveContentRetrieveResource.accessControlPolicy.labels)){
setverdict(fail, __SCOPE__ & ": Error: Labels attribute not deleted correctly")
}
}
}
}
testcase TC_CSE_DMR_UPD_004_ACP_PV_AT_LBL() runs on Tester system CseSystem {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment