Commit 02e3d783 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Review of TC_CSE_GMG_CRE_002 (not finished)


Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parent 0fa21ca2
......@@ -1640,12 +1640,17 @@ module OneM2M_Templates {
template (value) PrimitiveContent m_primitiveContentResponsePrimitive(template ResponsePrimitive p_responsePrimitive) := {
responsePrimitive := valueof(p_responsePrimitive)
}
template (value) PrimitiveContent m_primitiveContentGroup(template Group_optional p_group) := {
group_ := valueof(p_group)
}
template PrimitiveContent mw_primitiveContent := ?;
template PrimitiveContent mw_primitiveContentNotification (template Notification p_notification) := {
notification := p_notification
};
/**
* @desc Base primitiveContent for CREATE operation for AEAnnc resource
......
......@@ -10557,13 +10557,13 @@ module OneM2M_Testcases_CSE_Release_1 {
// Local variables
var MsgIn v_response;
var integer v_aeIndex := -1;
var integer v_containerIndex := -1;
var integer v_acpIndex := -1;
var integer v_targetResourceIndex := -1;
var integer v_cseBaseIndex := -1;
var RequestPrimitive v_request;
var template RequestPrimitive v_containerCreateRequest := m_createContainerBase;
var template RequestPrimitive v_createRequest;
var template RequestPrimitive v_createAcp := m_createAcp("NotInitialized", "MyACP", -, int61); //c_CUDNDi
var XSD.ID v_targetResourceAddress;
// Test control
if(not(PICS_ACP_SUPPORT)) {
setverdict(inconc, __SCOPE__ & ": AccessControlPolicy support is required to run this test case");
......@@ -10571,22 +10571,36 @@ module OneM2M_Testcases_CSE_Release_1 {
}
// Test component configuration
f_cf01Up();
f_cf02Up();
// Test adapter configuration
// Preamble
v_cseBaseIndex := f_getLatestLocalResourceIndex(vc_cse1);
vc_cse1.start(f_cse_registerRemoteCse(m_createRemoteCSE_poa(-, -, -, -, {f_getCompletePoA()})));
f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1);
v_aeIndex := f_cse_preamble_registerAe();
//Creating resource in Hosting CSE
vc_cse1.start(f_generateAndSetLocalResource(valueof(m_primitiveContentContainer(m_contentCreateContainer)), v_cseBaseIndex, int3));
vc_cse1.done;
// Test Body
v_targetResourceAddress := f_getLatestLocalResourceAddress(vc_cse1, e_nonHierarchical, e_spRelative);
v_aeIndex := f_cse_preamble_registerAe(-, -); //c_CRUDNDi
v_acpIndex := f_cse_createResource(int1, v_createAcp, v_aeIndex); // AE child resource
v_containerCreateRequest.primitiveContent.container.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[v_acpIndex].resource)};
v_containerIndex := f_cse_createResource(int3, v_containerCreateRequest, v_aeIndex); // AE child resource
v_targetResourceIndex := f_getLatestLocalResourceIndex(vc_cse1);
v_createRequest := m_createGroup(1, {f_getResourceId(vc_resourcesList[v_containerIndex].resource)}, omit, int3);
v_createRequest := m_createGroup(1, {v_targetResourceAddress}, omit, int3);
v_request := f_getCreateRequestPrimitive(int9, v_createRequest, v_aeIndex); // creating group
// Test Body
vc_cse1.start(f_cse_retrieveResourceHandler(v_targetResourceIndex, -));
f_send(e_mca_port, m_request(v_request));
tc_ac.start;
alt {
......@@ -10606,9 +10620,9 @@ module OneM2M_Testcases_CSE_Release_1 {
setverdict(fail, __SCOPE__ & ": No answer while retrieving resource");
}
}
f_checkAeSimuStatus();
f_aeSimu_checkComponentDoneAndGetVerdict(vc_cse1);
//Check to see if the resource is NOT present
if(f_cse_isResourceNotPresent(v_aeIndex, f_getResourceName(v_request.primitiveContent))){
setverdict(pass, __SCOPE__ & ":INFO: Resource not created");
......@@ -10620,7 +10634,7 @@ module OneM2M_Testcases_CSE_Release_1 {
f_cse_postamble_deleteResources();
// Tear down
f_cf01Down();
f_cf02Down();
}
/**
......
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