Commit 4c822ba4 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega

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

parents 047f7330 3ce9c839
......@@ -1844,7 +1844,8 @@ module OneM2M_Functions {
var ResponsePrimitive v_responsePrimitive;
var integer v_resourceIndex := -1;
p_requestPrimitive.from_ := PX_CSE1_ID;
//p_requestPrimitive.from_ := PX_CSE1_ID;
p_requestPrimitive.from_ := f_getOriginator(vc_remoteCseIndex, e_cse);
mccPort.send(f_getMsgOutPrimitive(m_request(valueof(p_requestPrimitive))));
tc_ac.start;
......@@ -4345,7 +4346,7 @@ module OneM2M_Functions {
* @param p_timestamp Given timestamp
* @return Year
*/
function f_getYear(charstring p_timestamp) runs on Tester return charstring {
function f_getYear(charstring p_timestamp) runs on Tester return integer {
var charstring v_year := "";
var integer i;
......@@ -4353,7 +4354,7 @@ module OneM2M_Functions {
for(i := 0; i <= 3; i := i+1){
v_year := v_year & p_timestamp[i];
}
return v_year;
return str2int(v_year);
} // end f_getYear
......@@ -4362,7 +4363,7 @@ module OneM2M_Functions {
* @param p_timestamp Given timestamp
* @return Year
*/
function f_getMonth(charstring p_timestamp) runs on Tester return charstring {
function f_getMonth(charstring p_timestamp) runs on Tester return integer {
var charstring v_month := "";
var integer i;
......@@ -4372,7 +4373,7 @@ module OneM2M_Functions {
v_month := v_month & p_timestamp[i];
}
}
return v_month;
return str2int(v_month);
} // end f_getYear
......
......@@ -3456,7 +3456,7 @@ module OneM2M_Templates {
nodeLink := omit,
triggerReferenceNumber := omit,
e2eSecInfo := omit,
supportedReleaseVersions := omit,//M
supportedReleaseVersions := omit,//O
choice := omit
}
......@@ -3679,7 +3679,7 @@ module OneM2M_Templates {
requestReachability := ?,//M
contentSerialization := *,//O
e2eSecInfo:= *, //O
supportedReleaseVersions := omit,//M
supportedReleaseVersions := ?,//M
choice := *//O
};
......
......@@ -4221,7 +4221,7 @@ module OneM2M_PermutationFunctions {
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": No child resources provided with RC set to " & int2str(enum2int(v_request.resultContent)));
setverdict(pass, __SCOPE__ & ": Attributes and child resources provided with RC set to " & int2str(enum2int(v_request.resultContent)));
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response {
tc_ac.stop;
......@@ -4291,7 +4291,7 @@ module OneM2M_PermutationFunctions {
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": No child resources provided with RC set to " & int2str(enum2int(v_request.resultContent)));
setverdict(pass, __SCOPE__ & ": Attributes and child resources reference provided with RC set to " & int2str(enum2int(v_request.resultContent)));
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response {
tc_ac.stop;
......@@ -4360,7 +4360,7 @@ module OneM2M_PermutationFunctions {
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": No child resources provided with RC set to " & int2str(enum2int(v_request.resultContent)));
setverdict(pass, __SCOPE__ & ": Only child resources references provided with RC set to " & int2str(enum2int(v_request.resultContent)));
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response {
tc_ac.stop;
......@@ -4423,13 +4423,13 @@ module OneM2M_PermutationFunctions {
// Test Body
v_request := valueof(m_retrieve(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex)));
v_request.resultContent := int6;//Child resource references
v_request.resultContent := int8;//Child resources
mcaPort.send(f_getMsgOutPrimitive(m_request(v_request)));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": No child resources provided with RC set to " & int2str(enum2int(v_request.resultContent)));
setverdict(pass, __SCOPE__ & ": Only child resources provided with RC set to " & int2str(enum2int(v_request.resultContent)));
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response {
tc_ac.stop;
......@@ -6691,7 +6691,7 @@ module OneM2M_PermutationFunctions {
// Preamble
v_createRequest := f_getCreateRequestPrimitive(int1, m_createAcpBase, -1);
v_currentTime := fx_generateTimestamp();
v_accessControlRule.accessControlContexts_list := {{{"* * * * " & f_getMonth(v_currentTime) & " *"}, omit, omit}};
v_accessControlRule.accessControlContexts_list := {{{"* * * * " & int2str(f_getMonth(v_currentTime)) & " *"}, omit, omit}};
v_createRequest.primitiveContent.accessControlPolicy.privileges.accessControlRule_list := {v_accessControlRule};
vc_acpAuxIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource
......@@ -6739,7 +6739,7 @@ module OneM2M_PermutationFunctions {
function f_CSE_SEC_ACP_006(template RequestPrimitive p_requestPrimitive, in ResponseStatusCode p_responseStatusCode) runs on AeSimu{
// Local variables
var MsgIn v_response;
var charstring v_month;
var integer v_month;
var charstring v_currentTime;
var integer v_aeIndex := -1;
var RequestPrimitive v_createRequest;
......@@ -6756,12 +6756,12 @@ module OneM2M_PermutationFunctions {
v_createRequest := f_getCreateRequestPrimitive(int1, m_createAcpBase, -1);
v_currentTime := fx_generateTimestamp();
v_month := f_getMonth(v_currentTime);
if(v_month =="12") {
v_month := "1";
if(v_month == 12) {
v_month := 1;
} else {
v_month := int2char(char2int(v_month) + 1);
v_month := v_month + 1;
}
v_accessControlRule.accessControlContexts_list := {{{"* * * * " & v_month & " *"}, omit, omit}};
v_accessControlRule.accessControlContexts_list := {{{"* * * * " & int2str(v_month) & " *"}, omit, omit}};
v_createRequest.primitiveContent.accessControlPolicy.privileges.accessControlRule_list := {v_accessControlRule};
vc_acpAuxIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource
......
......@@ -10684,6 +10684,7 @@ module OneM2M_Testcases_CSE_Release_1 {
function f_CSE_DIS_005() runs on AeSimu {
// Local variables
var RequestPrimitive v_requestPrimitive := m_createContainerBase;
var integer v_aeIndex := -1;
var integer v_resourceIndex := -1;
var RequestPrimitive v_request;
......@@ -10703,11 +10704,13 @@ module OneM2M_Testcases_CSE_Release_1 {
// Test adapter configuration
// Preamble
v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int31);//c_CRUDN)
v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int61);//c_CRUDN)
v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)});//AE1 is registred;
v_aeIndex := f_cse_preamble_registerAe();//AE1 is registred;
v_resourceIndex := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_aeIndex);
v_requestPrimitive := f_setAcpId(v_requestPrimitive, {f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)});
v_resourceIndex := f_cse_createResource(c_containerResourceType, v_requestPrimitive, v_aeIndex);
v_childResourceIndex := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_resourceIndex);
v_request := valueof(m_retrieveFilterUsageOption(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex), int1));
mcaPort.send(f_getMsgOutPrimitive(m_request(v_request)));
......@@ -11001,12 +11004,12 @@ module OneM2M_Testcases_CSE_Release_1 {
alt {
[] mcaPort.receive(mw_response(mw_responseDiscovery)) -> value v_response {
tc_ac.stop;
if(ispresent(v_response.primitive.responsePrimitive.primitiveContent)){
setverdict(fail, __SCOPE__ & ": Content is not empty");
if(lengthof(v_response.primitive.responsePrimitive.primitiveContent.uRIList) != 0) {
setverdict(fail, __SCOPE__ & ": URI List is not empty");
}
else
{
setverdict(pass, __SCOPE__ & ": Content is empty");
setverdict(pass, __SCOPE__ & ": URI List is empty");
}
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
......
......@@ -12583,6 +12583,8 @@ module OneM2M_Testcases_CSE_Release_2 {
vc_cse1.start(f_cse_notifyProcedure_notify(v_req2));
v_req2.from_ := PX_CSE1_ID;
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePollingResponse(v_req2))) -> value v_resp1 {
......
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