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

Review of the code + adjustments due to merge from Master

parent ebab7f27
No related branches found
No related tags found
2 merge requests!25Ae fixes,!20Stf531 check tpreq ttcn
...@@ -2221,9 +2221,9 @@ module OneM2M_Testcases { ...@@ -2221,9 +2221,9 @@ module OneM2M_Testcases {
//Check to see if the resource has been created //Check to see if the resource has been created
if (f_isResourceCreated(v_resourceIndex)){ if (f_isResourceCreated(v_resourceIndex)){
setverdict(pass, testcasename() & "Resource created"); setverdict(pass, __SCOPE__ & ":INFO: Resource created");
} else { } else {
setverdict(fail, testcasename() & "Resource not created"); setverdict(fail, __SCOPE__ & ":ERROR: Resource not created");
} }
// Postamble // Postamble
...@@ -2380,7 +2380,7 @@ module OneM2M_Testcases { ...@@ -2380,7 +2380,7 @@ module OneM2M_Testcases {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop; tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Resource type " & int2str(enum2int(p_resourceType)) & " created successfully"); setverdict(pass, __SCOPE__ & ": Resource type " & int2str(enum2int(p_resourceType)) & " created successfully");
v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, v_aeIndex); v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, p_resourceType, v_aeIndex);
} }
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop; tc_ac.stop;
...@@ -2395,9 +2395,9 @@ module OneM2M_Testcases { ...@@ -2395,9 +2395,9 @@ module OneM2M_Testcases {
//Check to see if the resource has been created //Check to see if the resource has been created
if(f_isResourceCreated(v_resourceIndex)){ if(f_isResourceCreated(v_resourceIndex)){
setverdict(pass, testcasename() & "Resource created"); setverdict(pass, __SCOPE__ & ":INFO: Resource created");
} else { } else {
setverdict(fail, testcasename() & "Resource not created"); setverdict(fail, __SCOPE__ & ":ERROR: Resource not created");
} }
// Postamble // Postamble
f_cse_postamble_deleteResources(); f_cse_postamble_deleteResources();
...@@ -2610,9 +2610,9 @@ module OneM2M_Testcases { ...@@ -2610,9 +2610,9 @@ module OneM2M_Testcases {
//Check to see if the resource has NOT been created //Check to see if the resource has NOT been created
if(f_isResourceNotCreated(v_aeIndex, f_getResourceName(v_request.primitiveContent))){ if(f_isResourceNotCreated(v_aeIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, testcasename() & "Resource not created"); setverdict(pass, __SCOPE__ & ":INFO: Resource not created");
} else { } else {
setverdict(fail, testcasename() & "Resource created"); setverdict(fail, __SCOPE__ & ":ERROR: Resource created");
} }
// Postamble // Postamble
...@@ -2710,9 +2710,9 @@ module OneM2M_Testcases { ...@@ -2710,9 +2710,9 @@ module OneM2M_Testcases {
//Check to see if the resource has NOT been created //Check to see if the resource has NOT been created
if(f_isResourceNotCreated(v_aeIndex, f_getResourceName(v_request.primitiveContent))){ if(f_isResourceNotCreated(v_aeIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, testcasename() & "Resource not created"); setverdict(pass, __SCOPE__ & ":INFO: Resource not created");
} else { } else {
setverdict(fail, testcasename() & "Resource created"); setverdict(fail, __SCOPE__ & ":ERROR: Resource created");
} }
...@@ -2802,7 +2802,7 @@ module OneM2M_Testcases { ...@@ -2802,7 +2802,7 @@ module OneM2M_Testcases {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop; tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Accepted creation rejected for resource type " & int2str(enum2int(p_resourceType))); setverdict(pass, __SCOPE__ & ": Accepted creation rejected for resource type " & int2str(enum2int(p_resourceType)));
v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, v_aeIndex); v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, p_resourceType, v_aeIndex);
} }
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop; tc_ac.stop;
...@@ -2817,9 +2817,9 @@ module OneM2M_Testcases { ...@@ -2817,9 +2817,9 @@ module OneM2M_Testcases {
//Check to see if the resource has been created //Check to see if the resource has been created
if(f_isResourceCreated(v_resourceIndex)){ if(f_isResourceCreated(v_resourceIndex)){
setverdict(pass, testcasename() & "Resource created"); setverdict(pass, __SCOPE__ & ":INFO: Resource created");
} else { } else {
setverdict(fail, testcasename() & "Resource not created"); setverdict(fail, __SCOPE__ & ":ERROR: Resource not created");
} }
// Postamble // Postamble
...@@ -2890,9 +2890,9 @@ module OneM2M_Testcases { ...@@ -2890,9 +2890,9 @@ module OneM2M_Testcases {
//Check to see if the resource has NOT been created //Check to see if the resource has NOT been created
if(f_isResourceNotCreated(v_containerIndex, f_getResourceName(v_request.primitiveContent))){ if(f_isResourceNotCreated(v_containerIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, testcasename() & "Resource not created"); setverdict(pass, __SCOPE__ & ":INFO: Resource not created");
} else { } else {
setverdict(fail, testcasename() & "Resource created"); setverdict(fail, __SCOPE__ & ":ERROR: Resource created");
} }
// Postamble // Postamble
...@@ -2962,9 +2962,9 @@ module OneM2M_Testcases { ...@@ -2962,9 +2962,9 @@ module OneM2M_Testcases {
//Check to see if the resource has been created or not //Check to see if the resource has been created or not
if(f_isResourceNotCreated(v_containerIndex, f_getResourceName(v_request.primitiveContent))){ if(f_isResourceNotCreated(v_containerIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, testcasename() & "Resource created"); setverdict(pass, __SCOPE__ & ":INFO: Resource created");
} else { } else {
setverdict(fail, testcasename() & "Resource not created"); setverdict(fail, __SCOPE__ & ":ERROR: Resource not created");
} }
// Postamble // Postamble
...@@ -3103,9 +3103,9 @@ module OneM2M_Testcases { ...@@ -3103,9 +3103,9 @@ module OneM2M_Testcases {
//Check to see if the resource has NOT been created //Check to see if the resource has NOT been created
if(f_isResourceNotCreated(v_containerIndex, f_getResourceName(v_request.primitiveContent))){ if(f_isResourceNotCreated(v_containerIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, testcasename() & "Resource not created"); setverdict(pass, __SCOPE__ & ":INFO: Resource not created");
} else { } else {
setverdict(fail, testcasename() & "Resource created"); setverdict(fail, __SCOPE__ & ":ERROR: Resource created");
} }
// Postamble // Postamble
...@@ -3176,9 +3176,9 @@ module OneM2M_Testcases { ...@@ -3176,9 +3176,9 @@ module OneM2M_Testcases {
//Check to see if the resource has NOT been created //Check to see if the resource has NOT been created
if(f_isResourceNotCreated(v_containerIndex, f_getResourceName(v_request.primitiveContent))){ if(f_isResourceNotCreated(v_containerIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, testcasename() & "Resource not created"); setverdict(pass, __SCOPE__ & ":INFO: Resource not created");
} else { } else {
setverdict(fail, testcasename() & "Resource created"); setverdict(fail, __SCOPE__ & ":ERROR: Resource created");
} }
// Postamble // Postamble
...@@ -3899,7 +3899,7 @@ module OneM2M_Testcases { ...@@ -3899,7 +3899,7 @@ module OneM2M_Testcases {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK(f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(f_getTemplateFromPrimitiveContent(v_request.primitiveContent)))) -> value v_response {
tc_ac.stop; tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Accepted creation for resource type " & int2str(enum2int(p_resourceType)) & " containing attribute " & p_optionalAttribute.name); setverdict(pass, __SCOPE__ & ": Accepted creation for resource type " & int2str(enum2int(p_resourceType)) & " containing attribute " & p_optionalAttribute.name);
v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, v_parentIndex); v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, p_resourceType, v_parentIndex);
} }
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK())) -> value v_response { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK())) -> value v_response {
tc_ac.stop; tc_ac.stop;
...@@ -3918,9 +3918,9 @@ module OneM2M_Testcases { ...@@ -3918,9 +3918,9 @@ module OneM2M_Testcases {
//Check to see if the resource has been created or not //Check to see if the resource has been created or not
if(f_isResourceCreated(v_resourceIndex)) { if(f_isResourceCreated(v_resourceIndex)) {
setverdict(pass, testcasename() & "Resource created"); setverdict(pass, __SCOPE__ & ":INFO: Resource created");
} else { } else {
setverdict(fail, testcasename() & "Resource not created"); setverdict(fail, __SCOPE__ & ":ERROR: Resource not created");
} }
// Postamble // Postamble
...@@ -9692,9 +9692,9 @@ module OneM2M_Testcases { ...@@ -9692,9 +9692,9 @@ module OneM2M_Testcases {
//Check to see if the resource has NOT been created //Check to see if the resource has NOT been created
if(f_isResourceNotCreated(v_aeIndex, f_getResourceName(v_request.primitiveContent))){ if(f_isResourceNotCreated(v_aeIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, testcasename() & "Resource not created"); setverdict(pass, __SCOPE__ & ":INFO: Resource not created");
} else { } else {
setverdict(fail, testcasename() & "Resource created"); setverdict(fail, __SCOPE__ & ":ERROR: Resource created");
} }
// Postamble // Postamble
...@@ -9735,7 +9735,7 @@ module OneM2M_Testcases { ...@@ -9735,7 +9735,7 @@ module OneM2M_Testcases {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop; tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Resource locationPolicy is created successfully with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))&"!"); setverdict(pass, __SCOPE__ & ": Resource locationPolicy is created successfully with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))&"!");
v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, v_aeAuxIndex); v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int10, v_aeAuxIndex);
} }
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop; tc_ac.stop;
...@@ -9750,9 +9750,9 @@ module OneM2M_Testcases { ...@@ -9750,9 +9750,9 @@ module OneM2M_Testcases {
//Check to see if the resource has been created or not //Check to see if the resource has been created or not
if(f_isResourceCreated(v_resourceIndex)) { if(f_isResourceCreated(v_resourceIndex)) {
setverdict(pass, testcasename() & "Resource created"); setverdict(pass, __SCOPE__ & ":INFO: Resource created");
} else { } else {
setverdict(fail, testcasename() & "Resource not created"); setverdict(fail, __SCOPE__ & ":ERROR: Resource not created");
} }
// Postamble // Postamble
...@@ -9817,9 +9817,9 @@ module OneM2M_Testcases { ...@@ -9817,9 +9817,9 @@ module OneM2M_Testcases {
//Check to see if the resource has NOT been created //Check to see if the resource has NOT been created
if(f_isResourceNotCreated(v_aeIndex, f_getResourceName(v_request.primitiveContent))){ if(f_isResourceNotCreated(v_aeIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, testcasename() & "Resource not created"); setverdict(pass, __SCOPE__ & ":INFO: Resource not created");
} else { } else {
setverdict(fail, testcasename() & "Resource created"); setverdict(fail, __SCOPE__ & ":ERROR: Resource created");
} }
// Postamble // Postamble
...@@ -9874,9 +9874,9 @@ module OneM2M_Testcases { ...@@ -9874,9 +9874,9 @@ module OneM2M_Testcases {
//Check to see if the resource has NOT been created //Check to see if the resource has NOT been created
if(f_isResourceNotCreated(v_aeIndex, f_getResourceName(v_request.primitiveContent))){ if(f_isResourceNotCreated(v_aeIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, testcasename() & "Resource not created"); setverdict(pass, __SCOPE__ & ":INFO: Resource not created");
} else { } else {
setverdict(fail, testcasename() & "Resource created"); setverdict(fail, __SCOPE__ & ":ERROR: Resource created");
} }
// Postamble // Postamble
f_cse_postamble_deleteResources(); f_cse_postamble_deleteResources();
...@@ -9903,7 +9903,6 @@ module OneM2M_Testcases { ...@@ -9903,7 +9903,6 @@ module OneM2M_Testcases {
var RequestPrimitive v_request; var RequestPrimitive v_request;
var RequestPrimitive v_locpolicy_request_preamble; var RequestPrimitive v_locpolicy_request_preamble;
var MsgIn v_response; var MsgIn v_response;
var integer v_resourceIndex := -1;
//Test component configuration //Test component configuration
f_cf01Up(); f_cf01Up();
...@@ -9924,7 +9923,6 @@ module OneM2M_Testcases { ...@@ -9924,7 +9923,6 @@ module OneM2M_Testcases {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) -> value v_response { [] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) -> value v_response {
tc_ac.stop; tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Update locationPolicy resource is rejected!!"); setverdict(pass, __SCOPE__ & ": Update locationPolicy resource is rejected!!");
v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, v_locPolicyResourceIndex);
} }
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop; tc_ac.stop;
...@@ -9937,12 +9935,7 @@ module OneM2M_Testcases { ...@@ -9937,12 +9935,7 @@ module OneM2M_Testcases {
f_checkCseTesterStatus(); f_checkCseTesterStatus();
//Check to see if the resource has been created or not //TODO: Check to see if the resource has been updated or not
if(f_isResourceCreated(v_resourceIndex)) {
setverdict(pass, testcasename() & "Resource created");
} else {
setverdict(fail, testcasename() & "Resource not created");
}
// Postamble // Postamble
f_cse_postamble_deleteResources(); f_cse_postamble_deleteResources();
...@@ -9969,7 +9962,6 @@ module OneM2M_Testcases { ...@@ -9969,7 +9962,6 @@ module OneM2M_Testcases {
var RequestPrimitive v_container_request_preamble; var RequestPrimitive v_container_request_preamble;
var MsgIn v_response; var MsgIn v_response;
var LocationSource v_locationSource := int1;//Network-based var LocationSource v_locationSource := int1;//Network-based
var integer v_resourceIndex := -1;
//Test component configuration //Test component configuration
f_cf01Up(); f_cf01Up();
...@@ -9992,7 +9984,6 @@ module OneM2M_Testcases { ...@@ -9992,7 +9984,6 @@ module OneM2M_Testcases {
setverdict(fail, __SCOPE__ & "No locationID is included in the response!"); setverdict(fail, __SCOPE__ & "No locationID is included in the response!");
}else{ }else{
setverdict(pass, __SCOPE__ & "Container resource associated with locationPolicy resource is successfully retrieved with locationID included in the response!"); setverdict(pass, __SCOPE__ & "Container resource associated with locationPolicy resource is successfully retrieved with locationID included in the response!");
v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, v_locContainerResourceIndex);
} }
} }
...@@ -10011,14 +10002,7 @@ module OneM2M_Testcases { ...@@ -10011,14 +10002,7 @@ module OneM2M_Testcases {
} }
f_checkCseTesterStatus(); f_checkCseTesterStatus();
//Check to see if the resource has been created or not
if(f_isResourceCreated(v_resourceIndex)) {
setverdict(pass, testcasename() & "Resource created");
} else {
setverdict(fail, testcasename() & "Resource not created");
}
// Postamble // Postamble
f_cse_postamble_deleteResources(); f_cse_postamble_deleteResources();
...@@ -10058,7 +10042,7 @@ module OneM2M_Testcases { ...@@ -10058,7 +10042,7 @@ module OneM2M_Testcases {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop; tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Resource locationPolicy is created successfully with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))&"!"); setverdict(pass, __SCOPE__ & ": Resource locationPolicy is created successfully with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))&"!");
v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, v_aeAuxIndex); v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int10, v_aeAuxIndex);
} }
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop; tc_ac.stop;
...@@ -10073,9 +10057,9 @@ module OneM2M_Testcases { ...@@ -10073,9 +10057,9 @@ module OneM2M_Testcases {
//Check to see if the resource has been created or not //Check to see if the resource has been created or not
if(f_isResourceCreated(v_resourceIndex)) { if(f_isResourceCreated(v_resourceIndex)) {
setverdict(pass, testcasename() & "Resource created"); setverdict(pass, __SCOPE__ & ":INFO: Resource created");
} else { } else {
setverdict(fail, testcasename() & "Resource not created"); setverdict(fail, __SCOPE__ & ":ERROR: Resource not created");
} }
// Postamble // Postamble
...@@ -10118,7 +10102,7 @@ module OneM2M_Testcases { ...@@ -10118,7 +10102,7 @@ module OneM2M_Testcases {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop; tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Resource locationPolicy is created successfully with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))&"!"); setverdict(pass, __SCOPE__ & ": Resource locationPolicy is created successfully with response status code: " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode))&"!");
v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, v_aeAuxIndex); v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int10, v_aeAuxIndex);
} }
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop; tc_ac.stop;
...@@ -10133,9 +10117,9 @@ module OneM2M_Testcases { ...@@ -10133,9 +10117,9 @@ module OneM2M_Testcases {
//Check to see if the resource has been created or not //Check to see if the resource has been created or not
if(f_isResourceCreated(v_resourceIndex)) { if(f_isResourceCreated(v_resourceIndex)) {
setverdict(pass, testcasename() & "Resource created"); setverdict(pass, __SCOPE__ & ":INFO: Resource created");
} else { } else {
setverdict(fail, testcasename() & "Resource not created"); setverdict(fail, __SCOPE__ & ":ERROR: Resource not created");
} }
// Postamble // Postamble
...@@ -10540,9 +10524,9 @@ module OneM2M_Testcases { ...@@ -10540,9 +10524,9 @@ module OneM2M_Testcases {
//Check to see if the resource has NOT been created //Check to see if the resource has NOT been created
if(f_isResourceNotCreated(v_aeIndex, f_getResourceName(v_request.primitiveContent))){ if(f_isResourceNotCreated(v_aeIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, testcasename() & "Resource not created"); setverdict(pass, __SCOPE__ & ":INFO: Resource not created");
} else { } else {
setverdict(fail, testcasename() & "Resource created"); setverdict(fail, __SCOPE__ & ":ERROR: Resource created");
} }
...@@ -10620,9 +10604,9 @@ module OneM2M_Testcases { ...@@ -10620,9 +10604,9 @@ module OneM2M_Testcases {
//Check to see if the resource has NOT been created //Check to see if the resource has NOT been created
if(f_isResourceNotCreated(v_aeIndex, f_getResourceName(v_request.primitiveContent))){ if(f_isResourceNotCreated(v_aeIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, testcasename() & "Resource not created"); setverdict(pass, __SCOPE__ & ":INFO: Resource not created");
} else { } else {
setverdict(fail, testcasename() & "Resource created"); setverdict(fail, __SCOPE__ & ":ERROR: Resource created");
} }
// Postamble // Postamble
...@@ -12888,9 +12872,9 @@ module OneM2M_Testcases { ...@@ -12888,9 +12872,9 @@ module OneM2M_Testcases {
//Check to see if the resource has NOT been created //Check to see if the resource has NOT been created
if(f_isResourceNotCreated(v_resourceIndex, f_getResourceName(v_request.primitiveContent))){ if(f_isResourceNotCreated(v_resourceIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, testcasename() & "Resource not created"); setverdict(pass, __SCOPE__ & ":INFO: Resource not created");
} else { } else {
setverdict(fail, testcasename() & "Resource created"); setverdict(fail, __SCOPE__ & ":ERROR: Resource created");
} }
//Postamble //Postamble
...@@ -12952,9 +12936,9 @@ module OneM2M_Testcases { ...@@ -12952,9 +12936,9 @@ module OneM2M_Testcases {
//Check to see if the resource has NOT been created //Check to see if the resource has NOT been created
if(f_isResourceNotCreated(v_contentInstanceResourceIndex, f_getResourceName(v_request.primitiveContent))){ if(f_isResourceNotCreated(v_contentInstanceResourceIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, testcasename() & "Resource not created"); setverdict(pass, __SCOPE__ & ":INFO: Resource not created");
} else { } else {
setverdict(fail, testcasename() & "Resource created"); setverdict(fail, __SCOPE__ & ":ERROR: Resource created");
} }
//Postamble //Postamble
...@@ -13024,9 +13008,9 @@ module OneM2M_Testcases { ...@@ -13024,9 +13008,9 @@ module OneM2M_Testcases {
//Check to see if the resource has NOT been created //Check to see if the resource has NOT been created
if(f_isResourceNotCreated(v_aeIndex, f_getResourceName(v_request.primitiveContent))){ if(f_isResourceNotCreated(v_aeIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, testcasename() & "Resource not created"); setverdict(pass, __SCOPE__ & ":INFO: Resource not created");
} else { } else {
setverdict(fail, testcasename() & "Resource created"); setverdict(fail, __SCOPE__ & ":ERROR: Resource created");
} }
//Postamble //Postamble
...@@ -13090,9 +13074,9 @@ module OneM2M_Testcases { ...@@ -13090,9 +13074,9 @@ module OneM2M_Testcases {
//Check to see if the resource has NOT been created //Check to see if the resource has NOT been created
if(f_isResourceNotCreated(v_aeIndex, f_getResourceName(v_request.primitiveContent))){ if(f_isResourceNotCreated(v_aeIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, testcasename() & "Resource not created"); setverdict(pass, __SCOPE__ & ":INFO: Resource not created");
} else { } else {
setverdict(fail, testcasename() & "Resource created"); setverdict(fail, __SCOPE__ & ":ERROR: Resource created");
} }
//Postamble //Postamble
...@@ -13160,9 +13144,9 @@ module OneM2M_Testcases { ...@@ -13160,9 +13144,9 @@ module OneM2M_Testcases {
//Check to see if the resource has NOT been created //Check to see if the resource has NOT been created
if(f_isResourceNotCreated(v_aeIndex, f_getResourceName(v_request.primitiveContent))){ if(f_isResourceNotCreated(v_aeIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, testcasename() & "Resource not created"); setverdict(pass, __SCOPE__ & ":INFO: Resource not created");
} else { } else {
setverdict(fail, testcasename() & "Resource created"); setverdict(fail, __SCOPE__ & ":ERROR: Resource created");
} }
//Postamble //Postamble
...@@ -13230,9 +13214,9 @@ module OneM2M_Testcases { ...@@ -13230,9 +13214,9 @@ module OneM2M_Testcases {
//Check to see if the resource has NOT been created //Check to see if the resource has NOT been created
if(f_isResourceNotCreated(v_aeIndex, f_getResourceName(v_request.primitiveContent))){ if(f_isResourceNotCreated(v_aeIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, testcasename() & "Resource not created"); setverdict(pass, __SCOPE__ & ":INFO: Resource not created");
} else { } else {
setverdict(fail, testcasename() & "Resource created"); setverdict(fail, __SCOPE__ & ":ERROR: Resource created");
} }
//Postamble //Postamble
...@@ -14472,7 +14456,8 @@ module OneM2M_Testcases { ...@@ -14472,7 +14456,8 @@ module OneM2M_Testcases {
var RequestPrimitive v_createRequest := valueof(m_createAcpBase); var RequestPrimitive v_createRequest := valueof(m_createAcpBase);
var AccessControlRule v_accessControlRule_1 := valueof(m_createAcr({PX_SUPER_USER}, int63)); var AccessControlRule v_accessControlRule_1 := valueof(m_createAcr({PX_SUPER_USER}, int63));
var AccessControlRule v_accessControlRule_2 := valueof(m_createAcr({"wait"}, int55)); var AccessControlRule v_accessControlRule_2 := valueof(m_createAcr({"wait"}, int55));
var integer v_resourceIndex := -1; const ResourceType c_accessControlPolicyType := int1;
// Test control // Test control
// Test component configuration // Test component configuration
...@@ -14491,37 +14476,32 @@ module OneM2M_Testcases { ...@@ -14491,37 +14476,32 @@ module OneM2M_Testcases {
v_contentResponse.accessControlPolicy.privileges.accessControlRule_list[1].accessControlOriginators := {f_getOriginator(v_aeIndex)}; v_contentResponse.accessControlPolicy.privileges.accessControlRule_list[1].accessControlOriginators := {f_getOriginator(v_aeIndex)};
// Test Body // Test Body
v_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource v_createRequest := f_getCreateRequestPrimitive(c_accessControlPolicyType, v_createRequest, -1);
mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(v_acpIndex), f_getOriginator(v_acpIndex)))); mcaPort.send(m_request(v_createRequest));
tc_ac.start; tc_ac.start;
alt { alt {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_contentResponse))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Response OK for retrieving");
v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, v_acpIndex);
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop; tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements"); setverdict(pass, __SCOPE__ & ": Resource type " & int2str(enum2int(c_accessControlPolicyType)) & " created successfully");
v_acpIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int1);
} }
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop; tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); setverdict(fail, __SCOPE__ & ": Error while creating resource type " & int2str(enum2int(c_accessControlPolicyType)));
} }
[] tc_ac.timeout { [] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(c_accessControlPolicyType)));
} }
} }
f_checkCseTesterStatus(); f_checkCseTesterStatus();
//Check to see if the resource has been created or not //Check to see if the resource has been created or not
if(f_isResourceCreated(v_resourceIndex)) { if(f_isResourceCreated(v_acpIndex)) {
setverdict(pass, testcasename() & "Resource created"); setverdict(pass, __SCOPE__ & ":INFO: Resource created");
} else { } else {
setverdict(fail, testcasename() & "Resource not created"); setverdict(fail, __SCOPE__ & ":ERROR: Resource not created");
} }
//Postamble //Postamble
...@@ -14548,7 +14528,8 @@ module OneM2M_Testcases { ...@@ -14548,7 +14528,8 @@ module OneM2M_Testcases {
var RequestPrimitive v_createRequest := valueof(m_createAcpBase); var RequestPrimitive v_createRequest := valueof(m_createAcpBase);
var AccessControlRule v_accessControlRule_1 := valueof(m_createAcr({PX_SUPER_USER}, int63)); var AccessControlRule v_accessControlRule_1 := valueof(m_createAcr({PX_SUPER_USER}, int63));
var AccessControlRule v_accessControlRule_2 := valueof(m_createAcr({"wait"}, int55)); var AccessControlRule v_accessControlRule_2 := valueof(m_createAcr({"wait"}, int55));
var integer v_resourceIndex := -1; const ResourceType c_accessControlPolicyType := int1;
// Test control // Test control
// Test component configuration // Test component configuration
...@@ -14567,37 +14548,32 @@ module OneM2M_Testcases { ...@@ -14567,37 +14548,32 @@ module OneM2M_Testcases {
v_contentResponse.accessControlPolicy.selfPrivileges.accessControlRule_list[1].accessControlOriginators := {f_getOriginator(v_aeIndex)}; v_contentResponse.accessControlPolicy.selfPrivileges.accessControlRule_list[1].accessControlOriginators := {f_getOriginator(v_aeIndex)};
// Test Body // Test Body
v_acpIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource v_createRequest := f_getCreateRequestPrimitive(c_accessControlPolicyType, v_createRequest, -1);// CSE child resource
mcaPort.send(m_request(m_retrieveResource(f_getResourceAddress(v_acpIndex), f_getOriginator(v_acpIndex)))); mcaPort.send(m_request(v_createRequest));
tc_ac.start; tc_ac.start;
alt { alt {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK(v_contentResponse))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Response OK for retrieving");
v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, v_acpIndex);
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop; tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error, resource elements provided not matching expected resource elements"); setverdict(pass, __SCOPE__ & ": Resource type " & int2str(enum2int(c_accessControlPolicyType)) & " created successfully");
v_acpIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, c_accessControlPolicyType);
} }
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop; tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error while retrieving resource"); setverdict(fail, __SCOPE__ & ": Error while creating resource type " & int2str(enum2int(c_accessControlPolicyType)));
} }
[] tc_ac.timeout { [] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while retrieving resource"); setverdict(fail, __SCOPE__ & ": No answer while creating resource type " & int2str(enum2int(c_accessControlPolicyType)));
} }
} }
f_checkCseTesterStatus(); f_checkCseTesterStatus();
//Check to see if the resource has been created or not //Check to see if the resource has been created or not
if(f_isResourceCreated(v_resourceIndex)) { if(f_isResourceCreated(v_acpIndex)) {
setverdict(pass, testcasename() & "Resource created"); setverdict(pass, __SCOPE__ & ":INFO: Resource created");
} else { } else {
setverdict(fail, testcasename() & "Resource not created"); setverdict(fail, __SCOPE__ & ":ERROR: Resource not created");
} }
//Postamble //Postamble
...@@ -14644,7 +14620,6 @@ module OneM2M_Testcases { ...@@ -14644,7 +14620,6 @@ module OneM2M_Testcases {
var AccessControlRule v_accessControlRule_1; var AccessControlRule v_accessControlRule_1;
var RequestPrimitive v_updateRequest; var RequestPrimitive v_updateRequest;
var SetOfAcrs v_setOfArcs; var SetOfAcrs v_setOfArcs;
var integer v_resourceIndex := -1;
// Test control // Test control
...@@ -14669,7 +14644,6 @@ module OneM2M_Testcases { ...@@ -14669,7 +14644,6 @@ module OneM2M_Testcases {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop; tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Successful operation on resource type int2 (Ae)"); setverdict(pass, __SCOPE__ & ": Successful operation on resource type int2 (Ae)");
v_resourceIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, v_acpIndex);
} }
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { [] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop; tc_ac.stop;
...@@ -14705,16 +14679,7 @@ module OneM2M_Testcases { ...@@ -14705,16 +14679,7 @@ module OneM2M_Testcases {
log(__SCOPE__ & ":INFO: No answer while updating resource type ACP"); log(__SCOPE__ & ":INFO: No answer while updating resource type ACP");
} }
} }
f_checkCseTesterStatus();
//Check to see if the resource has been created or not
if(f_isResourceCreated(v_resourceIndex)) {
setverdict(pass, testcasename() & "Resource created");
} else {
setverdict(fail, testcasename() & "Resource not created");
}
f_cse_postamble_deleteResources(); f_cse_postamble_deleteResources();
//Tear down //Tear down
......
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