Skip to content
Snippets Groups Projects
Commit e4718e92 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Correction of TC_CSE_DMR_DEL_002 and TC_CSE_DMR_DEL_004

parent c341f58e
No related branches found
No related tags found
1 merge request!25Ae fixes
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* @author oneM2M * @author oneM2M
* @version $URL: https://oldforge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Functions.ttcn $ * @version $URL: https://oldforge.etsi.org/svn/oneM2M/trunk/ttcn/LibOneM2M/OneM2M_Functions.ttcn $
* $Id: OneM2M_Functions.ttcn 330 2017-07-26 10:02:53Z reinaortega $ * $Id: OneM2M_Functions.ttcn 333 2017-07-28 08:17:47Z reinaortega $
* @desc Module containing functions for oneM2M * @desc Module containing functions for oneM2M
* *
*/ */
...@@ -976,6 +976,12 @@ module OneM2M_Functions { ...@@ -976,6 +976,12 @@ module OneM2M_Functions {
} //end f_cse_notifyProcedure_subscriptionDeletion } //end f_cse_notifyProcedure_subscriptionDeletion
function f_isResourceNotDeleted(in integer p_resourceIndex) runs on Tester return boolean {
//TODO Call f_isResourcePresent
return false;
}
/** /**
* @desc It determines whether the addressing method of the given address is non-hierarchical. Not valid for CSE-Base as target * @desc It determines whether the addressing method of the given address is non-hierarchical. Not valid for CSE-Base as target
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* @author oneM2M * @author oneM2M
* @version $URL: https://oldforge.etsi.org/svn/oneM2M/trunk/ttcn/OneM2M_Testcases.ttcn $ * @version $URL: https://oldforge.etsi.org/svn/oneM2M/trunk/ttcn/OneM2M_Testcases.ttcn $
* $Id: OneM2M_Testcases.ttcn 332 2017-07-28 07:24:06Z reinaortega $ * $Id: OneM2M_Testcases.ttcn 333 2017-07-28 08:17:47Z reinaortega $
* @desc Module containing test cases for oneM2M * @desc Module containing test cases for oneM2M
* *
*/ */
...@@ -9006,22 +9006,7 @@ module OneM2M_Testcases { ...@@ -9006,22 +9006,7 @@ module OneM2M_Testcases {
v_setOfArcs.accessControlRule_list := {v_accessControlRule_1, v_accessControlRule_2}; v_setOfArcs.accessControlRule_list := {v_accessControlRule_1, v_accessControlRule_2};
v_updateRequest := valueof(m_updateAcpPrivileges(v_setOfArcs, -)); v_updateRequest := valueof(m_updateAcpPrivileges(v_setOfArcs, -));
v_updateRequest := f_getUpdateRequestPrimitive(int1, vc_acpAuxIndex, v_updateRequest); v_updateRequest := f_getUpdateRequestPrimitive(int1, vc_acpAuxIndex, v_updateRequest);
f_cse_updateResource(v_updateRequest);
mcaPort.send(m_request(v_updateRequest));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Attribute of resource type int1 (Acp) updated successfully");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error while updating resource type int1 (Acp)");
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while updating resource type int1 (Acp)");
}
}
//Adjustments for ACP resource type //Adjustments for ACP resource type
if(p_resourceType == int1) { if(p_resourceType == int1) {
...@@ -9061,6 +9046,15 @@ module OneM2M_Testcases { ...@@ -9061,6 +9046,15 @@ module OneM2M_Testcases {
} }
} }
f_checkCseTesterStatus();
//Check if the resource has been deleted or not
if(f_isResourceNotDeleted(v_resourceIndex)) {
setverdict(pass, __SCOPE__ & ":INFO: Resource not deleted");
} else {
setverdict(fail, __SCOPE__ & ":INFO: Resource deleted");
}
// Postamble // Postamble
// We are forced to delete the Ae because the delete request in the postamble_deleteResources is sent by Ae itself, witch doesn't have privileges // We are forced to delete the Ae because the delete request in the postamble_deleteResources is sent by Ae itself, witch doesn't have privileges
f_cse_deleteResource(valueof(m_deleteRequest(f_getResourceAddress(v_aeIndex)))); f_cse_deleteResource(valueof(m_deleteRequest(f_getResourceAddress(v_aeIndex))));
...@@ -9201,25 +9195,9 @@ module OneM2M_Testcases { ...@@ -9201,25 +9195,9 @@ module OneM2M_Testcases {
v_childResourceIndex := f_cse_createResource(p_childResourceType, p_createRequestPrimitiveChildResource, v_resourceIndex); v_childResourceIndex := f_cse_createResource(p_childResourceType, p_createRequestPrimitiveChildResource, v_resourceIndex);
// Test Body f_cse_deleteResource(valueof(m_deleteRequest(f_getResourceAddress(v_resourceIndex))));
v_request := valueof(m_deleteRequest(f_getResourceAddress(v_resourceIndex)));
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ":Resource type " & int2str(enum2int(p_resourceType)) & " delete successfully");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error while deleting resource type " & int2str(enum2int(p_resourceType)));
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while deleting resource type " & int2str(enum2int(p_resourceType)));
}
}
//Test Body
mcaPort.send(m_request(m_deleteRequest(f_getResourceAddress(v_childResourceIndex), f_getOriginator(v_childResourceIndex)))); mcaPort.send(m_request(m_deleteRequest(f_getResourceAddress(v_childResourceIndex), f_getOriginator(v_childResourceIndex))));
tc_ac.start; tc_ac.start;
...@@ -14258,7 +14236,7 @@ module OneM2M_Testcases { ...@@ -14258,7 +14236,7 @@ module OneM2M_Testcases {
}; };
// Test Body // Test Body
v_notifyHandler.start(f_CSE_SUB_UPD_018(v_contentResponse, 2)); // check that no notification is received v_notifyHandler.start(f_CSE_SUB_UPD_007(v_contentResponse, 2)); // check that no notification is received
v_updateRequest.primitiveContent.aE.labels := v_labels_1; v_updateRequest.primitiveContent.aE.labels := v_labels_1;
v_request:= f_getUpdateRequestPrimitive(int2, v_aeIndex, v_updateRequest); // Update request 1 v_request:= f_getUpdateRequestPrimitive(int2, v_aeIndex, v_updateRequest); // Update request 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment