Commit 27245fdd authored by Axel Rennoch's avatar Axel Rennoch
Browse files

draft GMG tests BV_002 and BV_003

parent c083f644
......@@ -4108,14 +4108,14 @@ module OneM2M_Testcases {
var ResponsePrimitive v_responsePrimitive;
//v_createRequest.primitiveContent.any_1[0].Group_optional.currentNrOfMembers := 6;
const XSD.AnyURI c_memberRessourceAddress1 := "MEMBER_RESSOURCE_ADDRESS_1";
const XSD.AnyURI c_memberRessourceAddress2 := "MEMBER_RESSOURCE_ADDRESS_2";
const XSD.AnyURI c_memberRessourceAddress3 := "MEMBER_RESSOURCE_ADDRESS_3";
const XSD.AnyURI c_memberRessourceAddress4 := "MEMBER_RESSOURCE_ADDRESS_4";
const XSD.AnyURI c_memberRessourceAddress5 := "MEMBER_RESSOURCE_ADDRESS_5";
const XSD.AnyURI c_memberRessourceAddress6 := "MEMBER_RESSOURCE_ADDRESS_6";
v_createRequest.primitiveContent.any_1[0].Group_optional.memberIDs := {c_memberRessourceAddress1, c_memberRessourceAddress2, c_memberRessourceAddress3, c_memberRessourceAddress4, c_memberRessourceAddress5, c_memberRessourceAddress6};
const XSD.AnyURI c_memberResourceAddress1 := "MEMBER_RESOURCE_ADDRESS_1";
const XSD.AnyURI c_memberResourceAddress2 := "MEMBER_RESOURCE_ADDRESS_2";
const XSD.AnyURI c_memberResourceAddress3 := "MEMBER_RESOURCE_ADDRESS_3";
const XSD.AnyURI c_memberResourceAddress4 := "MEMBER_RESOURCE_ADDRESS_4";
const XSD.AnyURI c_memberResourceAddress5 := "MEMBER_RESOURCE_ADDRESS_5";
const XSD.AnyURI c_memberResourceAddress6 := "MEMBER_RESOURCE_ADDRESS_6";
v_createRequest.primitiveContent.any_1[0].Group_optional.memberIDs := {c_memberResourceAddress1, c_memberResourceAddress2, c_memberResourceAddress3, c_memberResourceAddress4, c_memberResourceAddress5, c_memberResourceAddress6};
v_createRequest.primitiveContent.any_1[0].Group_optional.maxNrOfMembers := 5;
......@@ -4167,9 +4167,64 @@ module OneM2M_Testcases {
// be retrieved due to lack of privilege.
group g_CSE_GMG_BV_002 {
testcase TC_CSE_GMG_BV_002() runs on CseTester system CseSystem
testcase TC_CSE_GMG_BV_002() runs on CseTester system CseSystem
{
//TODO
// Local constants
const ResourceType c_ResourceTypeGroup := int9; // <group> ?
const ResourceType c_ResourceTypeAcp := int1; // <ACP>
const XSD.String c_acpName := "ACP_NAME";
const ListOfURIs c_acor := {"NA"};
const AccessControlOperations c_allowedOperations := int63;
// Local variables
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_aeIndex := -1;
var integer v_acpIndex := -1;
var template RequestPrimitive v_createRequest := m_createGroupBase;
var template RequestPrimitive v_createAcp := m_createAcp(c_acpName, c_acpName, c_acor, c_allowedOperations);
// Test control
// Test component configuration
f_cf01Up();
// Test adapter configuration
// Preamble
v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
v_request := f_getCreateRequestPrimitive(c_ResourceTypeGroup, v_createRequest, v_aeIndex); // creating group
v_acpIndex := f_cse_createResource(c_ResourceTypeAcp, v_createAcp, v_aeIndex);
v_request.primitiveContent.any_1[0].Group_optional.accessControlPolicyIDs := {f_getResourceAddress(v_acpIndex)};
// Test Body
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int5105))) -> value v_response {
tc_ac.stop;
setverdict(pass, testcasename() & ": creation failed due to lack of privilege");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
tc_ac.stop;
setverdict(fail, testcasename() & ": Error while retrieving resource");
}
[] tc_ac.timeout {
setverdict(inconc, testcasename() & ": No answer while retrieving resource");
}
}
// Postamble
f_cse_postamble_deleteResources();
// Tear down
f_cf01Down();
}
} // end group g_CSE_GMG_BV_002
......@@ -4182,8 +4237,67 @@ module OneM2M_Testcases {
group g_CSE_GMG_BV_003 {
testcase TC_CSE_GMG_BV_003() runs on CseTester system CseSystem
{
//TODO
{
// Local constants
const ResourceType c_ResourceTypeGroup := int9; // <group> ?
const ResourceType c_ResourceTypeAcp := int1; // <ACP>
const XSD.String c_acpName := "ACP_NAME";
const ListOfURIs c_acor := {"NA"};
const AccessControlOperations c_allowedOperations := int63;
// Local variables
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_aeIndex := -1;
var integer v_acpIndex := -1;
var integer v_groupResourceIndex := -1;
var template RequestPrimitive v_createRequest := m_createGroupBase;
var template RequestPrimitive v_updateRequest := m_updateGroupBase;
var template RequestPrimitive v_createAcp := m_createAcp(c_acpName, c_acpName, c_acor, c_allowedOperations);
// Test control
// Test component configuration
f_cf01Up();
// Test adapter configuration
// Preamble
v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
v_groupResourceIndex := f_cse_createResource(c_ResourceTypeGroup, v_createRequest, v_aeIndex); // create group resource
v_acpIndex := f_cse_createResource(c_ResourceTypeAcp, v_createAcp, v_groupResourceIndex);
// Test Body
v_request := f_getUpdateRequestPrimitive(int9, v_groupResourceIndex, v_updateRequest);
v_request.primitiveContent.any_1[0].Group_optional.accessControlPolicyIDs := {f_getResourceAddress(v_acpIndex)};
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int5105))) -> value v_response {
tc_ac.stop;
setverdict(pass, testcasename() & ": creation failed due to lack of privilege");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
tc_ac.stop;
setverdict(fail, testcasename() & ": Error while retrieving resource");
}
[] tc_ac.timeout {
setverdict(inconc, testcasename() & ": No answer while retrieving resource");
}
}
// Postamble
f_cse_postamble_deleteResources();
// Tear down
f_cf01Down();
}
} // end group g_CSE_GMG_BV_003
......@@ -4205,14 +4319,14 @@ module OneM2M_Testcases {
var template RequestPrimitive v_updateRequest := m_updateGroupBase;
//v_updateRequest.primitiveContent.any_1[0].Group_optional.currentNrOfMembers := 6;
const XSD.AnyURI c_memberRessourceAddress1 := "MEMBER_RESSOURCE_ADDRESS_1";
const XSD.AnyURI c_memberRessourceAddress2 := "MEMBER_RESSOURCE_ADDRESS_2";
const XSD.AnyURI c_memberRessourceAddress3 := "MEMBER_RESSOURCE_ADDRESS_3";
const XSD.AnyURI c_memberRessourceAddress4 := "MEMBER_RESSOURCE_ADDRESS_4";
const XSD.AnyURI c_memberRessourceAddress5 := "MEMBER_RESSOURCE_ADDRESS_5";
const XSD.AnyURI c_memberRessourceAddress6 := "MEMBER_RESSOURCE_ADDRESS_6";
v_updateRequest.primitiveContent.any_1[0].Group_optional.memberIDs := {c_memberRessourceAddress1, c_memberRessourceAddress2, c_memberRessourceAddress3, c_memberRessourceAddress4, c_memberRessourceAddress5, c_memberRessourceAddress6};
const XSD.AnyURI c_memberResourceAddress1 := "MEMBER_RESOURCE_ADDRESS_1";
const XSD.AnyURI c_memberResourceAddress2 := "MEMBER_RESOURCE_ADDRESS_2";
const XSD.AnyURI c_memberResourceAddress3 := "MEMBER_RESOURCE_ADDRESS_3";
const XSD.AnyURI c_memberResourceAddress4 := "MEMBER_RESOURCE_ADDRESS_4";
const XSD.AnyURI c_memberResourceAddress5 := "MEMBER_RESOURCE_ADDRESS_5";
const XSD.AnyURI c_memberResourceAddress6 := "MEMBER_RESOURCE_ADDRESS_6";
v_updateRequest.primitiveContent.any_1[0].Group_optional.memberIDs := {c_memberResourceAddress1, c_memberResourceAddress2, c_memberResourceAddress3, c_memberResourceAddress4, c_memberResourceAddress5, c_memberResourceAddress6};
v_updateRequest.primitiveContent.any_1[0].Group_optional.maxNrOfMembers := 5;
......@@ -4902,6 +5016,26 @@ module OneM2M_Testcases {
}
} // end group g_CSE_GMG_BV_013
// Test objective:
// Check that the IUT detects the presence of duplicate member IDs during the creation of the
// group resource and removes the duplicate member IDs prior to updating of the group resource.
group g_CSE_GMG_BV_014 {
testcase TC_CSE_GMG_BV_014() runs on CseTester system CseSystem
{
// TODO
// Postamble
f_cse_postamble_deleteResources();
// Tear down
f_cf01Down();
}
} // end group g_CSE_GMG_BV_014
} // end group Group_Managment
......
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