Commit 0fa21ca2 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Review of TC_CSE_GMG_UPD_001


Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parent 83fe457a
......@@ -11110,16 +11110,15 @@ module OneM2M_Testcases_CSE_Release_1 {
function f_CSE_GMG_UPD_001() runs on AeSimu system CseSystem {
// Local variables
var MsgIn v_response;
var integer v_aeIndex := -1;
var integer v_containerIndex_1 := -1;
var integer v_containerIndex_2 := -1;
var integer v_acpIndex := -1;
var integer v_aeIndex, v_aeIndex_2 := -1;
var integer v_containerLocalIndex_1 := -1;
var integer v_containerLocalIndex_2 := -1;
var integer v_acpIndex_1, v_acpIndex_2 := -1;
var integer v_groupIndex := -1;
var RequestPrimitive v_request;
var template RequestPrimitive v_containerCreateRequest := m_createContainer_noResourceName;
var template RequestPrimitive v_updateRequest := m_updateGroupBase;
var template RequestPrimitive v_createAcp := m_createAcp("NotInitialized", "MyAcp", -, int61); //c_CUDNDi
// Test control
if(not(PICS_ACP_SUPPORT)) {
setverdict(inconc, __SCOPE__ & ": AccessControlPolicy support is required to run this test case");
......@@ -11127,20 +11126,35 @@ module OneM2M_Testcases_CSE_Release_1 {
}
// Test component configuration
f_cf01Up();
f_cf01Up(true);
// Test adapter configuration
// Preamble
v_aeIndex := f_cse_preamble_registerAe(-, -); //c_CRUDNDi
v_acpIndex := f_cse_createResource(int1, v_createAcp, v_aeIndex); // AE child resource
v_containerIndex_1 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource
v_groupIndex := f_cse_createResource(int9, m_createGroup(2, {f_getResourceId(vc_resourcesList[v_containerIndex_1].resource)}, omit, int3, -, - , -), v_aeIndex);
v_acpIndex_1 := f_cse_createResource(int1, m_createAcp("NotInitialized", "NoRetrievePermission", -, int61), -); // AE child resource
v_acpIndex_2 := f_cse_createResource(int1, m_createAcp("NotInitialized", "PermissionForEveryone", -, -), -); // AE child resource
v_containerCreateRequest := f_setAcpId(v_containerCreateRequest, {f_getResourceId(vc_resourcesList[v_acpIndex].resource)});
v_containerIndex_2 := f_cse_createResource(int3, v_containerCreateRequest, v_aeIndex); // AE child resource
vc_ae2.start(f_cse_createResource(int2, m_createAe(PX_TS_AE2.appId, -, PX_TS_AE2.aeIdStem, c_defaultAE2Name, omit), -1)); // AE2 is registred
f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2);
v_aeIndex_2 := f_getLatestResourceIndex(vc_ae2);
v_containerCreateRequest := f_setAcpId(v_containerCreateRequest, {f_getResourceId(vc_resourcesList[v_acpIndex_2].resource)});
v_updateRequest.primitiveContent.group_.memberIDs := {f_getResourceId(vc_resourcesList[v_containerIndex_2].resource)};
vc_ae2.start(f_cse_createResource(int3, v_containerCreateRequest, v_aeIndex_2));
f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2);
v_containerLocalIndex_1 := f_getLatestResource(vc_ae2);
v_groupIndex := f_cse_createResource(int9, m_createGroup(2, {f_getResourceId(vc_resourcesList[v_containerLocalIndex_1].resource)}, omit, int3, -, - , -), v_aeIndex);
v_containerCreateRequest := f_setAcpId(v_containerCreateRequest, {f_getResourceId(vc_resourcesList[v_acpIndex_1].resource)});
vc_ae2.start(f_cse_createResource(int3, v_containerCreateRequest, v_aeIndex_2));
f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2);
v_containerLocalIndex_2 := f_getLatestResource(vc_ae2);
v_updateRequest.primitiveContent.group_.memberIDs := {f_getResourceId(vc_resourcesList[v_containerLocalIndex_2].resource)};
v_request := f_getUpdateRequestPrimitive(int9, v_groupIndex, v_updateRequest); // creating group
// Test Body
......
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