Skip to content
Snippets Groups Projects
Commit abab4535 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

TC_CSE_SEC_ACP_CRE_001 and TC_CSE_SEC_ACP_CRE_002 corrected

parent 9ce0582f
No related branches found
No related tags found
1 merge request!25Ae fixes
......@@ -17681,7 +17681,7 @@ module OneM2M_Testcases {
// Test adapter configuration
// Preamble
v_aeIndex := f_cse_preamble_registerAe(-, -); // Only use for setting the ACR_2's accessControlOriginators attribute to AE_ID
v_aeIndex := f_cse_preamble_registerAe(-, -); // Use for setting the ACR_2's accessControlOriginators attribute to AE_ID
v_createRequest.primitiveContent.accessControlPolicy.privileges.accessControlRule_list := {v_accessControlRule_1,v_accessControlRule_2};
v_createRequest.primitiveContent.accessControlPolicy.privileges.accessControlRule_list[1].accessControlOriginators := {f_getOriginator(v_aeIndex)};
......@@ -17691,16 +17691,20 @@ module OneM2M_Testcases {
v_contentResponse.accessControlPolicy.privileges.accessControlRule_list[1].accessControlOriginators := {f_getOriginator(v_aeIndex)};
// Test Body
v_createRequest := f_getCreateRequestPrimitive(c_accessControlPolicyType, v_createRequest, -1);
v_createRequest := f_getCreateRequestPrimitive(c_accessControlPolicyType, v_createRequest, v_aeIndex);
mcaPort.send(m_request(v_createRequest));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Resource type " & int2str(enum2int(c_accessControlPolicyType)) & " created successfully");
v_acpIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int1);
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error while creating resource type " & int2str(enum2int(c_accessControlPolicyType)));
......@@ -17763,16 +17767,20 @@ module OneM2M_Testcases {
v_contentResponse.accessControlPolicy.selfPrivileges.accessControlRule_list[1].accessControlOriginators := {f_getOriginator(v_aeIndex)};
// Test Body
v_createRequest := f_getCreateRequestPrimitive(c_accessControlPolicyType, v_createRequest, -1);// CSE child resource
v_createRequest := f_getCreateRequestPrimitive(c_accessControlPolicyType, v_createRequest, v_aeIndex);// CSE child resource
mcaPort.send(m_request(v_createRequest));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Resource type " & int2str(enum2int(c_accessControlPolicyType)) & " created successfully");
v_acpIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, c_accessControlPolicyType);
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error while creating resource type " & int2str(enum2int(c_accessControlPolicyType)));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment