Commit 5553743a authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega

Merge branch 'Release1' of https://git.onem2m.org/TST/ATS into Release1

parents c6934093 d97f8772
......@@ -35,6 +35,7 @@ module OneM2M_Functions {
// Map
map(self:mcaPort, system:mcaPort);
map(self:mcaPortIn, system:mcaPortIn);
map(self:acPort, system:acPort);
activate(a_default());
......@@ -1288,6 +1289,25 @@ module OneM2M_Functions {
} //end f_compareURIs
/**
* @desc Sending a request primitive on mcaPort on AeSimu
* @param p_resourceType Resource type of the resource to be created
* @param p_requestPrimitive CREATE request primitive for the resource to be created
* @param p_parentIndex Internal resource index which indicates the parent of the resource to be created
* @return Internal resource index of the created resource
* @verdict
*/
function f_cse_sendCreateRequestPrimitive(in ResourceType p_resourceType, template RequestPrimitive p_requestPrimitive := m_create, integer p_parentIndex := -1) runs on AeSimu{
var RequestPrimitive v_request;
var integer v_resourceIndex := -1;
v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, p_parentIndex);
mcaPort.send(m_request(v_request));
}
}//end group AeSimu
group CseSimuFunctions {
......
......@@ -2041,13 +2041,14 @@ module OneM2M_PermutationFunctions {
v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive, v_aeIndex);
if(p_resourceType == int23){
//vc_ae2.start(f_cse_notifyProcedure_subscriptionVerificationHandler());
}
v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_aeIndex);
v_request := f_getCreateRequestPrimitive(p_resourceType, p_requestPrimitive, v_aeIndex);
// Test Body
v_request.requestIdentifier := "Existing resource";
if(p_resourceType == int23){
vc_ae2.start(f_cse_notifyProcedure_subscriptionVerificationHandler());
}
mcaPort.send(m_request(v_request));
tc_ac.start;
......@@ -4323,60 +4324,6 @@ module OneM2M_PermutationFunctions {
}//end f_CSE_DMR_UPD_004
function f_CSE_DMR_UPD_005(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on AeSimu {
// Local variables
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_aeIndex := -1;
var integer v_ae2Index := -1;
var integer v_resourceIndex := -1;
// Test control
// Test component configuration
f_cf01Up(true);
// Test adapter configuration
// Preamble
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitive, p_resourceType);
v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive , v_aeIndex);
// Test Body
v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive);
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int4004))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Resource " & c_defaultResourceName & " of type " & int2str(enum2int(p_resourceType)) & " not found");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error while updating an unexisting resource type " & int2str(enum2int(p_resourceType)));
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType)));
}
}
// Postamble
f_cse_postamble_deleteResources();
// Tear down
f_cf01Down();
}//end f_CSE_DMR_UPD_005
function f_CSE_DMR_UPD_006(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on AeSimu {
// Local variables
......@@ -4552,38 +4499,39 @@ module OneM2M_PermutationFunctions {
}//end f_CSE_DMR_UPD_008
function f_CSE_DMR_UPD_009(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive, template (omit) AttributeAux_list p_nullFields := omit) runs on AeSimu {
function f_CSE_DMR_UPD_009(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on AeSimu {
// Local variables
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_aeIndex := -1;
var integer v_resourceIndex := -1;
var integer v_ae2Index := -1;
var integer v_resourceIndex := -1;
// Test control
// Test component configuration
f_cf01Up(true);
// Test adapter configuration
// Preamble
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitive, p_resourceType);
v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_aeIndex);
v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive , v_aeIndex);
// Test Body
v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive);
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int4102))) -> value v_response {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int4000))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Operation not allowed. Attribute not updated with an unacceptable value");
setverdict(pass, __SCOPE__ & ": It is not possible to update an unexisting attribute of resource type " & int2str(enum2int(p_resourceType)));
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop;
......@@ -4591,21 +4539,19 @@ module OneM2M_PermutationFunctions {
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Attribute has been updated with an unacceptable value");
setverdict(fail, __SCOPE__ & ": Error while updating an unexisting resource type " & int2str(enum2int(p_resourceType)));
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType)));
}
}
vc_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex);
// Postamble
f_cse_postamble_deleteResources();
// Tear down
f_cf01Down();
}//end f_CSE_DMR_UPD_009
function f_CSE_DMR_UPD_014(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on AeSimu {
......@@ -4771,7 +4717,7 @@ module OneM2M_PermutationFunctions {
// Preamble
if(p_resourceType != int2) {
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
v_aeIndex := f_cse_preamble_registerAe(-, {f_getAnnouncementTargetPoA("HTTP", PX_AE1_ADDRESS, "")});//c_CRUDNDi);
}
if(p_resourceType != int1) {
......@@ -4796,7 +4742,16 @@ module OneM2M_PermutationFunctions {
//Test Body
v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive);
mcaPort.send(m_request(v_request)); //CSEBase
if(p_resourceType == int23) { //Subscription
v_request.primitiveContent.subscription.notificationURI := {f_getResourceAddress(v_aeIndex)};
}
mcaPort.send(m_request(v_request));
if(p_resourceType == int23) { //Subscription
f_cse_notifyProcedure_subscriptionVerificationHandler();
}
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value vc_response {
......
......@@ -126,10 +126,10 @@ module OneM2M_TestControl_IN_profile {
if(PICS_CNT_LBL) {execute (TC_CSE_DMR_UPD_002_CNT_LBL());}
if(PICS_CNT_LBL) {execute (TC_CSE_DMR_UPD_003_CNT_LBL());}
if(PICS_CNT_MNI and PICS_CNT_LBL) {execute (TC_CSE_DMR_UPD_004_CNT_ET_MNI_LBL());}
if(true) {execute (TC_CSE_DMR_UPD_005_CNT_EXC());}
if(true) {execute (TC_CSE_DMR_UPD_005());}
if(true) {execute (TC_CSE_DMR_UPD_007_CNT_CT());}
if(true) {execute (TC_CSE_DMR_UPD_008_CNT_ET());}
if(true) {execute (TC_CSE_DMR_UPD_009_CNT_ET());}
if(true) {execute (TC_CSE_DMR_UPD_009_CNT_EXC());}
if(true) {execute (TC_CSE_DMR_UPD_010 ());}
if(true) {execute (TC_CSE_DMR_UPD_016_CNT_ET());}
if(true) {execute (TC_CSE_DMR_DEL_001_CNT());}
......@@ -185,10 +185,9 @@ module OneM2M_TestControl_IN_profile {
if(PICS_SUB_LBL) {execute (TC_CSE_DMR_UPD_002_SUB_LBL());}
if(PICS_SUB_LBL) {execute (TC_CSE_DMR_UPD_003_SUB_LBL());}
if(PICS_SUB_LBL and PICS_SUB_EXC) {execute (TC_CSE_DMR_UPD_004_SUB_ET_LBL_EXC());}
if(true) {execute (TC_CSE_DMR_UPD_005_SUB_MNI());}
if(true) {execute (TC_CSE_DMR_UPD_007_SUB_CT());}
if(true) {execute (TC_CSE_DMR_UPD_008_SUB_ET());}
if(true) {execute (TC_CSE_DMR_UPD_009_SUB_ET());}
if(true) {execute (TC_CSE_DMR_UPD_009_SUB_MNI());}
if(true) {execute (TC_CSE_DMR_UPD_016_SUB_ET());}
if(true) {execute (TC_CSE_DMR_UPD_016_SUB_NU());}
if(true) {execute (TC_CSE_DMR_UPD_016_SUB_NCT());}
......@@ -218,10 +217,9 @@ module OneM2M_TestControl_IN_profile {
if(PICS_ACP_LBL) {execute (TC_CSE_DMR_UPD_002_ACP_LBL());}
if(PICS_ACP_LBL) {execute (TC_CSE_DMR_UPD_003_ACP_LBL());}
if(PICS_ACP_AT and PICS_ACP_LBL) {execute (TC_CSE_DMR_UPD_004_ACP_PV_AT_LBL());}
if(true) {execute (TC_CSE_DMR_UPD_005_ACP_EXC());}
if(true) {execute (TC_CSE_DMR_UPD_007_ACP_CT());}
if(true) {execute (TC_CSE_DMR_UPD_008_ACP_ET());}
if(true) {execute (TC_CSE_DMR_UPD_009_ACP_ET());}
if(true) {execute (TC_CSE_DMR_UPD_009_ACP_EXC());}
if(true) {execute (TC_CSE_DMR_UPD_016_ACP_ET());}
if(true) {execute (TC_CSE_DMR_UPD_016_ACP_PV());}
if(true) {execute (TC_CSE_DMR_UPD_016_ACP_PVS());}
......@@ -336,11 +334,10 @@ module OneM2M_TestControl_IN_profile {
if(PICS_GRP_LBL) {execute (TC_CSE_DMR_UPD_002_GRP_LBL());}
if(PICS_GRP_LBL) {execute (TC_CSE_DMR_UPD_003_GRP_LBL());}
if(PICS_GRP_GN and PICS_GRP_LBL) {execute (TC_CSE_DMR_UPD_004_GRP_ET_GN_LBL());}
if(true) {execute (TC_CSE_DMR_UPD_005_GRP_EXC());}
if(PICS_ACP_SUPPORT) {execute (TC_CSE_DMR_UPD_006_GRP_LBL());}
if(true) {execute (TC_CSE_DMR_UPD_007_GRP_CT());}
if(true) {execute (TC_CSE_DMR_UPD_008_GRP_ET());}
if(true) {execute (TC_CSE_DMR_UPD_009_GRP_ET());}
if(true) {execute (TC_CSE_DMR_UPD_009_GRP_EXC());}
if(true) {execute (TC_CSE_DMR_UPD_016_GRP_ET());}
if(true) {execute (TC_CSE_DMR_UPD_016_GRP_MNM());}
if(true) {execute (TC_CSE_DMR_UPD_016_GRP_MID());}
......
......@@ -149,10 +149,10 @@ module OneM2M_TestControl_MN_profile {
if(PICS_CNT_LBL) {execute (TC_CSE_DMR_UPD_002_CNT_LBL());}
if(PICS_CNT_LBL) {execute (TC_CSE_DMR_UPD_003_CNT_LBL());}
if(PICS_CNT_MNI and PICS_CNT_LBL) {execute (TC_CSE_DMR_UPD_004_CNT_ET_MNI_LBL());}
if(true) {execute (TC_CSE_DMR_UPD_005_CNT_EXC());}
if(true) {execute (TC_CSE_DMR_UPD_005());}
if(true) {execute (TC_CSE_DMR_UPD_007_CNT_CT());}
if(true) {execute (TC_CSE_DMR_UPD_008_CNT_ET());}
if(true) {execute (TC_CSE_DMR_UPD_009_CNT_ET());}
if(true) {execute (TC_CSE_DMR_UPD_009_CNT_EXC());}
if(true) {execute (TC_CSE_DMR_UPD_010());}
if(true) {execute (TC_CSE_DMR_UPD_016_CNT_ET());}
if(true) {execute (TC_CSE_DMR_DEL_001_CNT());}
......@@ -208,10 +208,9 @@ module OneM2M_TestControl_MN_profile {
if(PICS_SUB_LBL) {execute (TC_CSE_DMR_UPD_002_SUB_LBL());}
if(PICS_SUB_LBL) {execute (TC_CSE_DMR_UPD_003_SUB_LBL());}
if(true) {execute (TC_CSE_DMR_UPD_004_SUB_ET_LBL_EXC());}
if(true) {execute (TC_CSE_DMR_UPD_005_SUB_MNI());}
if(true) {execute (TC_CSE_DMR_UPD_007_SUB_CT());}
if(true) {execute (TC_CSE_DMR_UPD_008_SUB_ET());}
if(true) {execute (TC_CSE_DMR_UPD_009_SUB_ET());}
if(true) {execute (TC_CSE_DMR_UPD_009_SUB_MNI());}
if(true) {execute (TC_CSE_DMR_UPD_016_SUB_ET());}
if(true) {execute (TC_CSE_DMR_UPD_016_SUB_NU());}
if(true) {execute (TC_CSE_DMR_UPD_016_SUB_NCT());}
......@@ -241,10 +240,9 @@ module OneM2M_TestControl_MN_profile {
if(PICS_ACP_LBL) {execute (TC_CSE_DMR_UPD_002_ACP_LBL());}
if(PICS_ACP_LBL) {execute (TC_CSE_DMR_UPD_003_ACP_LBL());}
if(true) {execute (TC_CSE_DMR_UPD_004_ACP_PV_AT_LBL());}
if(true) {execute (TC_CSE_DMR_UPD_005_ACP_EXC());}
if(true) {execute (TC_CSE_DMR_UPD_007_ACP_CT());}
if(true) {execute (TC_CSE_DMR_UPD_008_ACP_ET());}
if(true) {execute (TC_CSE_DMR_UPD_009_ACP_ET());}
if(true) {execute (TC_CSE_DMR_UPD_009_ACP_EXC());}
if(true) {execute (TC_CSE_DMR_UPD_016_ACP_ET());}
if(true) {execute (TC_CSE_DMR_UPD_016_ACP_PV());}
if(true) {execute (TC_CSE_DMR_UPD_016_ACP_PVS());}
......@@ -358,11 +356,10 @@ module OneM2M_TestControl_MN_profile {
if(PICS_GRP_LBL) {execute (TC_CSE_DMR_UPD_002_GRP_LBL());}
if(PICS_GRP_LBL) {execute (TC_CSE_DMR_UPD_003_GRP_LBL());}
if(true) {execute (TC_CSE_DMR_UPD_004_GRP_ET_GN_LBL());}
if(true) {execute (TC_CSE_DMR_UPD_005_GRP_EXC());}
if(PICS_ACP_SUPPORT) {execute (TC_CSE_DMR_UPD_006_GRP_LBL());}
if(true) {execute (TC_CSE_DMR_UPD_007_GRP_CT());}
if(true) {execute (TC_CSE_DMR_UPD_008_GRP_ET());}
if(true) {execute (TC_CSE_DMR_UPD_009_GRP_ET());}
if(true) {execute (TC_CSE_DMR_UPD_009_GRP_EXC());}
if(true) {execute (TC_CSE_DMR_UPD_016_GRP_ET());}
if(true) {execute (TC_CSE_DMR_UPD_016_GRP_MNM());}
if(true) {execute (TC_CSE_DMR_UPD_016_GRP_MID());}
......
This diff is collapsed.
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