Commit fd0f0e59 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Review and clean up of TC_CSE_REG_CRE_008


Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parent 576498b5
......@@ -622,7 +622,6 @@ module OneM2M_Templates {
* @desc Reception template for update remoteCSE resource
*/
template RequestPrimitive mw_updateRemoteCSE(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_update := {
resourceType := int16,
primitiveContent:= {remoteCSE := ?}
};
......@@ -632,11 +631,16 @@ module OneM2M_Templates {
primitiveContent := {aEAnnc := m_contentUpdateAEAnnc}
};
template RequestPrimitive mw_updateAEAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_update:= {
requestIdentifier := testcasename() & "-m_updateAEAnnc",
primitiveContent := {aEAnnc := ?}
};
/**
* @desc Base Reception template for update ContainerAnnc
*/
template RequestPrimitive mw_updateContainerAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_update := {
resourceType := int10003,
primitiveContent := {containerAnnc := ?}
};
......@@ -644,7 +648,6 @@ module OneM2M_Templates {
* @desc Base Reception template for update GroupAnnc
*/
template RequestPrimitive mw_updateGroupAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_update := {
resourceType := int10009,
primitiveContent := {groupAnnc := ?}
};
......@@ -652,7 +655,6 @@ module OneM2M_Templates {
* @desc Base Reception template for update AccessControlPolicyAnnc
*/
template RequestPrimitive mw_updateAccessControlPolicyAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_update := {
resourceType := int10001,
primitiveContent := {accessControlPolicyAnnc := ?}
};
......@@ -676,7 +678,6 @@ module OneM2M_Templates {
* @desc Base Reception template for update TimeSeriesAnnc
*/
template RequestPrimitive mw_updateTimeSeriesAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_update := {
resourceType := int10029,
primitiveContent := {timeSeriesAnnc := ?}
};
......
......@@ -900,6 +900,9 @@ module OneM2M_Testcases_CSE_Release_1 {
var RequestPrimitive v_request;
var integer v_cseBaseIndex := -1;
var integer v_aeIndex := -1;
var integer v_aeIndex_ae1 := -1;
var integer v_aeAnncIndex := -1;
var ResourceType v_resourceType := int2;
//Test control
......@@ -909,41 +912,49 @@ module OneM2M_Testcases_CSE_Release_1 {
}
// Test component configuration
f_cf02UpCseSimuMaster();
f_cf02UpCseSimuMaster(int1);
//Preamble
vc_remoteCseIndex := f_cse_registrationRemoteCse(mw_createRemoteCSE);
vc_ae1.start(f_cse_createResource(int2, m_createAe(PX_APP_ID, omit, "S")));
v_aeAnncIndex := f_cse_announcementProcedure_createHandler(-, -, -);
f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1);
//TODO:
//v_request := valueof(m_delete(f_getResourceAddress(v_aeIndex), f_getOriginator(v_aeIndex)));
//mcaPort.send(f_getMsgOutPrimitive(m_request(v_request)));
v_aeIndex_ae1 := f_getLatestResourceIndex(vc_ae1);
v_aeIndex := f_getLatestResource(vc_ae1);
vc_ae1.start(f_cse_deleteResource(v_aeIndex_ae1));
f_cse_announcementProcedure_updateHandler(mw_updateAEAnnc, -, v_aeAnncIndex);
f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1);
//Test Body
vc_ae1.start(f_cse_createResource(int2, m_createAe(PX_APP_ID, omit, "S")));
vc_ae1.start(f_cse_createResource(int2, m_createAe(PX_APP_ID, omit, vc_resourcesList[v_aeIndex].resource.aE.aE_ID)));
tc_ac.start;
alt {
[] mccPortIn.receive(mw_request(mw_createAEAnnc_s_ae_id(f_getResourceAddress(-1,e_hierarchical, e_spRelative) & "/S", "CSE_ID", -))) {
[] mccPortIn.receive(mw_request(mw_updateAEAnnc)) -> value vc_request {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": AE creation redirected.");
setverdict(pass, __SCOPE__ & ": AE Announced UPDATE received");
f_processUpdateRequestPrimitive(vc_request.primitive.requestPrimitive);
mccPortIn.send(f_getMsgOutPrimitive(m_response(vc_response.primitive.responsePrimitive)));
}
[] mccPortIn.receive(mw_request(mw_createAEAnnc_s_ae_id(f_getResourceAddress(-1,e_hierarchical, e_absolute) & "/S", "CSE_ID", -))) {
[] mccPortIn.receive(mw_request(mw_update)) {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": AE creation redirected.");
}
[] mccPortIn.receive {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error while creating AE");
setverdict(fail, __SCOPE__ & ": Wrong UPDATE request received ");
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while creating AE");
}
}
f_cseSimu_checkComponentDoneAndGetVerdict(vc_ae1);
// Postamble
f_cse_postamble_deleteResourcesCSE();
......
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