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

STF531 - correction of CSE/REG/CRE/022 and 023 & added a simpl postambleDelete function for CSE

parent e9fe7f3d
No related branches found
No related tags found
1 merge request!25Ae fixes
...@@ -378,6 +378,48 @@ module OneM2M_Functions { ...@@ -378,6 +378,48 @@ module OneM2M_Functions {
f_cse_postamble_default(); f_cse_postamble_default();
} }
/**
* @desc Deletion of all resources created during the test case execution. IUT gets clean and ready for next execution
* @verdict
*/
function f_cse_postamble_deleteResourcesCSE() runs on CseTester {
var integer i;
var XSD.ID v_resourceAddress;
var RequestPrimitive v_request;
if (PX_RUN_POSTAMBLE) {
for(i := lengthof(vc_resourcesIndexToBeDeleted) -1; i >=0; i := i - 1) {
v_resourceAddress := f_getResourceAddress(vc_resourcesIndexToBeDeleted[i]);
v_request := valueof(m_delete(v_resourceAddress, f_getOriginator(vc_resourcesIndexToBeDeleted[i],false)));
v_request.from_ := PX_SUPER_CSE_ID;
mccPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mccPort.receive(mw_response(mw_responsePrimitiveOK)) {
tc_ac.stop;
log(__SCOPE__&" INFO: Resource " & v_request.to_ & " deleted");
}
[] mccPort.receive(mw_response(mw_responsePrimitiveKO)) {
tc_ac.stop;
log(__SCOPE__&" INFO: Error while deleting resource " & v_request.to_);
}
[] tc_ac.timeout {
log(__SCOPE__&" INFO: No answer while deleting resource " & v_request.to_);
}
}
}
}
f_cse_postamble_default();
}
/** /**
* @desc Default postamble * @desc Default postamble
* @verdict * @verdict
...@@ -1680,6 +1722,9 @@ module OneM2M_Functions { ...@@ -1680,6 +1722,9 @@ module OneM2M_Functions {
if(ischosen(p_contentResource.serviceSubscribedAppRule)) { if(ischosen(p_contentResource.serviceSubscribedAppRule)) {
return p_contentResource.serviceSubscribedAppRule.resourceName; return p_contentResource.serviceSubscribedAppRule.resourceName;
} }
if(ischosen(p_contentResource.remoteCSE)) {
return p_contentResource.remoteCSE.resourceName;
}
log(__SCOPE__&":WARNING: Primitive Content Kind not implemented"); log(__SCOPE__&":WARNING: Primitive Content Kind not implemented");
return "resourceNameNotFound"; return "resourceNameNotFound";
......
...@@ -43,7 +43,7 @@ module OneM2M_TestControl { ...@@ -43,7 +43,7 @@ module OneM2M_TestControl {
execute(TC_CSE_REG_CRE_018()); execute(TC_CSE_REG_CRE_018());
execute(TC_CSE_REG_CRE_022()); execute(TC_CSE_REG_CRE_022());
execute(TC_CSE_REG_CRE_023()); execute(TC_CSE_REG_CRE_023());
execute(TC_CSE_REG_CRE_024()); execute(TC_CSE_REG_CRE_025());
execute(TC_CSE_REG_CRE_026()); execute(TC_CSE_REG_CRE_026());
execute(TC_CSE_REG_RET_001()); execute(TC_CSE_REG_RET_001());
execute(TC_CSE_REG_RET_005()); execute(TC_CSE_REG_RET_005());
......
...@@ -1295,6 +1295,8 @@ module OneM2M_Testcases { ...@@ -1295,6 +1295,8 @@ module OneM2M_Testcases {
[] mccPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response { [] mccPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response {
tc_ac.stop; tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Resource type remoteCSE created successfully"); setverdict(pass, __SCOPE__ & ": Resource type remoteCSE created successfully");
f_checkAttributesToBeSaved(int16, v_request, v_response.primitive.responsePrimitive);
vc_aeAuxIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int16);
} }
[] mccPort.receive(mw_response(mw_responsePrimitiveOK)) { [] mccPort.receive(mw_response(mw_responsePrimitiveOK)) {
tc_ac.stop; tc_ac.stop;
...@@ -1310,7 +1312,7 @@ module OneM2M_Testcases { ...@@ -1310,7 +1312,7 @@ module OneM2M_Testcases {
} }
// Postamble // Postamble
f_cse_postamble_deleteResources(); f_cse_postamble_deleteResourcesCSE();
// Tear down // Tear down
f_cf04Down(); f_cf04Down();
...@@ -1347,6 +1349,8 @@ module OneM2M_Testcases { ...@@ -1347,6 +1349,8 @@ module OneM2M_Testcases {
[] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { [] mccPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop; tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Resource type remoteCSE created successfully"); setverdict(pass, __SCOPE__ & ": Resource type remoteCSE created successfully");
f_checkAttributesToBeSaved(int16, v_request, v_response.primitive.responsePrimitive);
vc_aeAuxIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int16);
} }
[] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response { [] mccPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop; tc_ac.stop;
...@@ -1358,7 +1362,7 @@ module OneM2M_Testcases { ...@@ -1358,7 +1362,7 @@ module OneM2M_Testcases {
} }
// Postamble // Postamble
f_cse_postamble_deleteResources(); f_cse_postamble_deleteResourcesCSE();
// Tear down // Tear down
f_cf04Down(); f_cf04Down();
......
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