Security group test cases corrections:

- Use of different variables for creation of ACPs in order to have different requestIdentifiers
- m_contentCreateAcp to use "*" for selfprivileges
Signed-off-by: Miguel Angel Reina Ortega's avatarreinaortega <miguelangel.reinaortega@etsi.org>
parent 165ec447
...@@ -1148,7 +1148,7 @@ module OneM2M_Templates { ...@@ -1148,7 +1148,7 @@ module OneM2M_Templates {
accessControlRule_list := {valueof(m_createAcr(p_acor, p_allowedOperations))} accessControlRule_list := {valueof(m_createAcr(p_acor, p_allowedOperations))}
},//M },//M
selfPrivileges := { selfPrivileges := {
accessControlRule_list := {valueof(m_createAcr(p_acor, int63))} accessControlRule_list := {valueof(m_createAcr({"*"}, int63))}
},//M },//M
choice := omit //NP choice := omit //NP
}; };
......
...@@ -19134,6 +19134,7 @@ module OneM2M_Testcases { ...@@ -19134,6 +19134,7 @@ module OneM2M_Testcases {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response { [] mcaPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response {
tc_ac.stop; tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Resource type " & int2str(enum2int(c_accessControlPolicyType)) & " created successfully"); setverdict(pass, __SCOPE__ & ": Resource type " & int2str(enum2int(c_accessControlPolicyType)) & " created successfully");
f_checkAttributesToBeSaved(c_accessControlPolicyType, v_createRequest, v_response.primitive.responsePrimitive);
v_acpIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, c_accessControlPolicyType, v_aeIndex); v_acpIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, c_accessControlPolicyType, v_aeIndex);
} }
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response { [] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) -> value v_response {
...@@ -19180,7 +19181,8 @@ module OneM2M_Testcases { ...@@ -19180,7 +19181,8 @@ module OneM2M_Testcases {
var integer v_aeIndex := -1; var integer v_aeIndex := -1;
var integer v_acpIndex1 := -1; var integer v_acpIndex1 := -1;
var integer v_acpIndex2 := -1; var integer v_acpIndex2 := -1;
var RequestPrimitive v_createRequest := valueof(m_createAcp(f_getResourceAddress(-1), omit)); var RequestPrimitive v_createRequestAcp1 := valueof(m_createAcp(f_getResourceAddress(-1), omit));
var RequestPrimitive v_createRequestAcp2 := valueof(m_createAcp(f_getResourceAddress(-1), omit));
var RequestPrimitive v_updateRequest := valueof(m_updateAeBase); var RequestPrimitive v_updateRequest := valueof(m_updateAeBase);
var AccessControlRule v_accessControlRule_1; var AccessControlRule v_accessControlRule_1;
var AccessControlRule v_accessControlRule_2; var AccessControlRule v_accessControlRule_2;
...@@ -19196,9 +19198,9 @@ module OneM2M_Testcases { ...@@ -19196,9 +19198,9 @@ module OneM2M_Testcases {
// Test adapter configuration // Test adapter configuration
// Preamble // Preamble
v_acpIndex1 := f_cse_createResource(int1, v_createRequest); // CSE child resource v_acpIndex1 := f_cse_createResource(int1, v_createRequestAcp1); // CSE child resource
v_acpIndex2 := f_cse_createResource(int1, v_createRequest); // CSE child resource v_acpIndex2 := f_cse_createResource(int1, v_createRequestAcp2); // CSE child resource
v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex1].resource)}, -); v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex1].resource)}, -);
...@@ -19261,8 +19263,9 @@ module OneM2M_Testcases { ...@@ -19261,8 +19263,9 @@ module OneM2M_Testcases {
var integer v_aeIndex := -1; var integer v_aeIndex := -1;
var integer v_acpIndex1 := -1; var integer v_acpIndex1 := -1;
var integer v_acpIndex2 := -1; var integer v_acpIndex2 := -1;
var RequestPrimitive v_createRequest := valueof(m_createAcp(f_getResourceAddress(-1), omit)); var RequestPrimitive v_createRequestAcp1 := valueof(m_createAcp(f_getResourceAddress(-1), omit));
var RequestPrimitive v_updateRequest := valueof(m_updateAeBase); var RequestPrimitive v_createRequestAcp2 := valueof(m_createAcp(f_getResourceAddress(-1), omit));
var RequestPrimitive v_updateRequest;
var AccessControlRule v_accessControlRule_1; var AccessControlRule v_accessControlRule_1;
var AccessControlRule v_accessControlRule_2; var AccessControlRule v_accessControlRule_2;
var SetOfAcrs v_setOfArcs_1; var SetOfAcrs v_setOfArcs_1;
...@@ -19277,9 +19280,9 @@ module OneM2M_Testcases { ...@@ -19277,9 +19280,9 @@ module OneM2M_Testcases {
// Test adapter configuration // Test adapter configuration
// Preamble // Preamble
v_acpIndex1 := f_cse_createResource(int1, v_createRequest); // CSE child resource v_acpIndex1 := f_cse_createResource(int1, v_createRequestAcp1); // CSE child resource
v_acpIndex2 := f_cse_createResource(int1, v_createRequest); // CSE child resource v_acpIndex2 := f_cse_createResource(int1, v_createRequestAcp2); // CSE child resource
v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex1].resource)}, -); v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpIndex1].resource)}, -);
...@@ -19292,6 +19295,7 @@ module OneM2M_Testcases { ...@@ -19292,6 +19295,7 @@ module OneM2M_Testcases {
f_cse_updateResource(v_updateRequest); f_cse_updateResource(v_updateRequest);
// Test Body // Test Body
v_updateRequest := valueof(m_updateAeBase);
v_updateRequest.primitiveContent.aE.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[v_acpIndex2].resource)}; v_updateRequest.primitiveContent.aE.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[v_acpIndex2].resource)};
v_updateRequest := f_getUpdateRequestPrimitive(int1, v_aeIndex, v_updateRequest); v_updateRequest := f_getUpdateRequestPrimitive(int1, v_aeIndex, v_updateRequest);
......
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