Commit 4c822ba41e92e41aca04dc9acbd87a3c3b19c933

Authored by Miguel Angel Reina Ortega
2 parents 047f7330 3ce9c839

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

... ... @@ -1844,7 +1844,8 @@ module OneM2M_Functions {
1844 1844 var ResponsePrimitive v_responsePrimitive;
1845 1845 var integer v_resourceIndex := -1;
1846 1846  
1847   - p_requestPrimitive.from_ := PX_CSE1_ID;
  1847 + //p_requestPrimitive.from_ := PX_CSE1_ID;
  1848 + p_requestPrimitive.from_ := f_getOriginator(vc_remoteCseIndex, e_cse);
1848 1849  
1849 1850 mccPort.send(f_getMsgOutPrimitive(m_request(valueof(p_requestPrimitive))));
1850 1851 tc_ac.start;
... ... @@ -4345,7 +4346,7 @@ module OneM2M_Functions {
4345 4346 * @param p_timestamp Given timestamp
4346 4347 * @return Year
4347 4348 */
4348   - function f_getYear(charstring p_timestamp) runs on Tester return charstring {
  4349 + function f_getYear(charstring p_timestamp) runs on Tester return integer {
4349 4350  
4350 4351 var charstring v_year := "";
4351 4352 var integer i;
... ... @@ -4353,7 +4354,7 @@ module OneM2M_Functions {
4353 4354 for(i := 0; i <= 3; i := i+1){
4354 4355 v_year := v_year & p_timestamp[i];
4355 4356 }
4356   - return v_year;
  4357 + return str2int(v_year);
4357 4358  
4358 4359 } // end f_getYear
4359 4360  
... ... @@ -4362,7 +4363,7 @@ module OneM2M_Functions {
4362 4363 * @param p_timestamp Given timestamp
4363 4364 * @return Year
4364 4365 */
4365   - function f_getMonth(charstring p_timestamp) runs on Tester return charstring {
  4366 + function f_getMonth(charstring p_timestamp) runs on Tester return integer {
4366 4367  
4367 4368 var charstring v_month := "";
4368 4369 var integer i;
... ... @@ -4372,7 +4373,7 @@ module OneM2M_Functions {
4372 4373 v_month := v_month & p_timestamp[i];
4373 4374 }
4374 4375 }
4375   - return v_month;
  4376 + return str2int(v_month);
4376 4377  
4377 4378 } // end f_getYear
4378 4379  
... ...
... ... @@ -3456,7 +3456,7 @@ module OneM2M_Templates {
3456 3456 nodeLink := omit,
3457 3457 triggerReferenceNumber := omit,
3458 3458 e2eSecInfo := omit,
3459   - supportedReleaseVersions := omit,//M
  3459 + supportedReleaseVersions := omit,//O
3460 3460 choice := omit
3461 3461 }
3462 3462  
... ... @@ -3679,7 +3679,7 @@ module OneM2M_Templates {
3679 3679 requestReachability := ?,//M
3680 3680 contentSerialization := *,//O
3681 3681 e2eSecInfo:= *, //O
3682   - supportedReleaseVersions := omit,//M
  3682 + supportedReleaseVersions := ?,//M
3683 3683 choice := *//O
3684 3684 };
3685 3685  
... ...
... ... @@ -4221,7 +4221,7 @@ module OneM2M_PermutationFunctions {
4221 4221 alt {
4222 4222 [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response {
4223 4223 tc_ac.stop;
4224   - setverdict(pass, __SCOPE__ & ": No child resources provided with RC set to " & int2str(enum2int(v_request.resultContent)));
  4224 + setverdict(pass, __SCOPE__ & ": Attributes and child resources provided with RC set to " & int2str(enum2int(v_request.resultContent)));
4225 4225 }
4226 4226 [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response {
4227 4227 tc_ac.stop;
... ... @@ -4291,7 +4291,7 @@ module OneM2M_PermutationFunctions {
4291 4291 alt {
4292 4292 [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response {
4293 4293 tc_ac.stop;
4294   - setverdict(pass, __SCOPE__ & ": No child resources provided with RC set to " & int2str(enum2int(v_request.resultContent)));
  4294 + setverdict(pass, __SCOPE__ & ": Attributes and child resources reference provided with RC set to " & int2str(enum2int(v_request.resultContent)));
4295 4295 }
4296 4296 [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response {
4297 4297 tc_ac.stop;
... ... @@ -4360,7 +4360,7 @@ module OneM2M_PermutationFunctions {
4360 4360 alt {
4361 4361 [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response {
4362 4362 tc_ac.stop;
4363   - setverdict(pass, __SCOPE__ & ": No child resources provided with RC set to " & int2str(enum2int(v_request.resultContent)));
  4363 + setverdict(pass, __SCOPE__ & ": Only child resources references provided with RC set to " & int2str(enum2int(v_request.resultContent)));
4364 4364 }
4365 4365 [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response {
4366 4366 tc_ac.stop;
... ... @@ -4423,13 +4423,13 @@ module OneM2M_PermutationFunctions {
4423 4423  
4424 4424 // Test Body
4425 4425 v_request := valueof(m_retrieve(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex)));
4426   - v_request.resultContent := int6;//Child resource references
  4426 + v_request.resultContent := int8;//Child resources
4427 4427 mcaPort.send(f_getMsgOutPrimitive(m_request(v_request)));
4428 4428 tc_ac.start;
4429 4429 alt {
4430 4430 [] mcaPort.receive(mw_response(mw_responsePrimitive(int2000, p_contentResponse))) -> value v_response {
4431 4431 tc_ac.stop;
4432   - setverdict(pass, __SCOPE__ & ": No child resources provided with RC set to " & int2str(enum2int(v_request.resultContent)));
  4432 + setverdict(pass, __SCOPE__ & ": Only child resources provided with RC set to " & int2str(enum2int(v_request.resultContent)));
4433 4433 }
4434 4434 [] mcaPort.receive(mw_response(mw_responsePrimitiveOK(p_contentResponse))) -> value v_response {
4435 4435 tc_ac.stop;
... ... @@ -6691,7 +6691,7 @@ module OneM2M_PermutationFunctions {
6691 6691 // Preamble
6692 6692 v_createRequest := f_getCreateRequestPrimitive(int1, m_createAcpBase, -1);
6693 6693 v_currentTime := fx_generateTimestamp();
6694   - v_accessControlRule.accessControlContexts_list := {{{"* * * * " & f_getMonth(v_currentTime) & " *"}, omit, omit}};
  6694 + v_accessControlRule.accessControlContexts_list := {{{"* * * * " & int2str(f_getMonth(v_currentTime)) & " *"}, omit, omit}};
6695 6695 v_createRequest.primitiveContent.accessControlPolicy.privileges.accessControlRule_list := {v_accessControlRule};
6696 6696 vc_acpAuxIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource
6697 6697  
... ... @@ -6739,7 +6739,7 @@ module OneM2M_PermutationFunctions {
6739 6739 function f_CSE_SEC_ACP_006(template RequestPrimitive p_requestPrimitive, in ResponseStatusCode p_responseStatusCode) runs on AeSimu{
6740 6740 // Local variables
6741 6741 var MsgIn v_response;
6742   - var charstring v_month;
  6742 + var integer v_month;
6743 6743 var charstring v_currentTime;
6744 6744 var integer v_aeIndex := -1;
6745 6745 var RequestPrimitive v_createRequest;
... ... @@ -6756,12 +6756,12 @@ module OneM2M_PermutationFunctions {
6756 6756 v_createRequest := f_getCreateRequestPrimitive(int1, m_createAcpBase, -1);
6757 6757 v_currentTime := fx_generateTimestamp();
6758 6758 v_month := f_getMonth(v_currentTime);
6759   - if(v_month =="12") {
6760   - v_month := "1";
  6759 + if(v_month == 12) {
  6760 + v_month := 1;
6761 6761 } else {
6762   - v_month := int2char(char2int(v_month) + 1);
  6762 + v_month := v_month + 1;
6763 6763 }
6764   - v_accessControlRule.accessControlContexts_list := {{{"* * * * " & v_month & " *"}, omit, omit}};
  6764 + v_accessControlRule.accessControlContexts_list := {{{"* * * * " & int2str(v_month) & " *"}, omit, omit}};
6765 6765 v_createRequest.primitiveContent.accessControlPolicy.privileges.accessControlRule_list := {v_accessControlRule};
6766 6766 vc_acpAuxIndex := f_cse_createResource(int1, v_createRequest); // CSE child resource
6767 6767  
... ...
... ... @@ -10684,6 +10684,7 @@ module OneM2M_Testcases_CSE_Release_1 {
10684 10684  
10685 10685 function f_CSE_DIS_005() runs on AeSimu {
10686 10686 // Local variables
  10687 + var RequestPrimitive v_requestPrimitive := m_createContainerBase;
10687 10688 var integer v_aeIndex := -1;
10688 10689 var integer v_resourceIndex := -1;
10689 10690 var RequestPrimitive v_request;
... ... @@ -10703,11 +10704,13 @@ module OneM2M_Testcases_CSE_Release_1 {
10703 10704 // Test adapter configuration
10704 10705  
10705 10706 // Preamble
10706   - v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int31);//c_CRUDN)
  10707 + v_acpAuxIndex := f_cse_preamble_createAcpAux(-, int61);//c_CRUDN)
10707 10708  
10708   - v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)});//AE1 is registred;
  10709 + v_aeIndex := f_cse_preamble_registerAe();//AE1 is registred;
10709 10710  
10710   - v_resourceIndex := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_aeIndex);
  10711 + v_requestPrimitive := f_setAcpId(v_requestPrimitive, {f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)});
  10712 +
  10713 + v_resourceIndex := f_cse_createResource(c_containerResourceType, v_requestPrimitive, v_aeIndex);
10711 10714 v_childResourceIndex := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_resourceIndex);
10712 10715 v_request := valueof(m_retrieveFilterUsageOption(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex), int1));
10713 10716 mcaPort.send(f_getMsgOutPrimitive(m_request(v_request)));
... ... @@ -11001,12 +11004,12 @@ module OneM2M_Testcases_CSE_Release_1 {
11001 11004 alt {
11002 11005 [] mcaPort.receive(mw_response(mw_responseDiscovery)) -> value v_response {
11003 11006 tc_ac.stop;
11004   - if(ispresent(v_response.primitive.responsePrimitive.primitiveContent)){
11005   - setverdict(fail, __SCOPE__ & ": Content is not empty");
  11007 + if(lengthof(v_response.primitive.responsePrimitive.primitiveContent.uRIList) != 0) {
  11008 + setverdict(fail, __SCOPE__ & ": URI List is not empty");
11006 11009 }
11007 11010 else
11008 11011 {
11009   - setverdict(pass, __SCOPE__ & ": Content is empty");
  11012 + setverdict(pass, __SCOPE__ & ": URI List is empty");
11010 11013 }
11011 11014 }
11012 11015 [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
... ...
... ... @@ -12583,6 +12583,8 @@ module OneM2M_Testcases_CSE_Release_2 {
12583 12583  
12584 12584 vc_cse1.start(f_cse_notifyProcedure_notify(v_req2));
12585 12585  
  12586 + v_req2.from_ := PX_CSE1_ID;
  12587 +
12586 12588 tc_ac.start;
12587 12589 alt {
12588 12590 [] mcaPort.receive(mw_response(mw_responsePollingResponse(v_req2))) -> value v_resp1 {
... ...