Skip to content
Snippets Groups Projects
Commit e27f30c1 authored by Pramod Kulkarni's avatar Pramod Kulkarni
Browse files

Corrections to CSE/REG/UPD/003 to check we receive the update request as in...

Corrections to CSE/REG/UPD/003 to check we receive the update request as in this case the IUT is triggered to send the update request

Signed-off-by: default avatarpkulkarni <pkulkarni75@gmail.com>
parent c553fb27
No related branches found
No related tags found
No related merge requests found
......@@ -3023,6 +3023,10 @@ module OneM2M_Testcases_CSE {
}//end f_CSE_REG_UPD_002
} //end g_CSE_REG_UPD_002
/**
* @desc Check that IUT sends a <remoteCSE> update request with OPTIONAL_ATTRIBUTE attribute.
*
*/
group g_CSE_REG_UPD_003 {
testcase TC_CSE_REG_UPD_003_ET() runs on Tester system CseSystem {
......@@ -3102,7 +3106,7 @@ module OneM2M_Testcases_CSE {
var RequestPrimitive v_request;
var ResourceType v_resourceType := int16; //remoteCSE
var template UtTriggerPrimitive v_utRequest := m_utCreateRemoteCSE;
var charstring v_action := "Please, send a valid RETRIEVE Request containing To set to " & PX_CSE1_ADDRESS & " and Content containing remoteCSE resource containing a valid attribute " & p_attribute[0];
var charstring v_action := "Please, send a valid UPDATE Request containing To set to " & PX_CSE1_ADDRESS & " and Content containing remoteCSE resource containing a valid attribute " & p_attribute[0];
// Test control
if(not(PICS_MN_CSE)) {
......@@ -3126,27 +3130,16 @@ module OneM2M_Testcases_CSE {
// Test Body
v_request := f_getUpdateRequestPrimitive(int16, vc_remoteCseIndex, p_requestPrimitive);
mccPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mccPort.receive(mw_response(mw_responsePrimitive(int2004, f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Accepted updation for resource type remoteCSE containing attribute " & p_attribute[0]);
f_setResource(v_request.primitiveContent,int16);
}
[] mccPort.receive(mw_response(mw_responsePrimitiveOK(f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response {
[] mccPortIn.receive(mw_request(v_request)) {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code in the response");
setverdict(pass, __SCOPE__ & ": Received request for updation for resource type remoteCSE containing attribute " & p_attribute[0]);
f_setResource(v_request.primitiveContent,int16);
}
[] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Accepted updation for resource type remoteCSE without containing attribute " & p_attribute[0]);
f_setResource(v_request.primitiveContent,int16);
}
[] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
[] mccPortIn.receive {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Rejected updation of resource type remoteCSE containing attribute" & p_attribute[0]);
setverdict(fail, __SCOPE__ & ": Error: Did not receive update request for resource type remoteCSE");
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while updating resource type remoteCSE");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment