Commit 988faa84 authored by Antonio Castillo Verdugo's avatar Antonio Castillo Verdugo
Browse files

- Small fix in m_contentCreateAcp template


- Small fix in permutation function f_CSE_DMR_RET_013
- Small fix in permutation function f_CSE_DMR_RET_014
- Created permutation function f_CSE_DMR_UPD_009
- Created permutation function f_CSE_DIS_008
- Created permutation TC_CSE_DMR_RET_014_CSR
- Created permutation TC_CSE_DMR_UPD_009_CNT_ET
- Created permutation TC_CSE_DMR_UPD_009_ACP_ET
- Created permutation TC_CSE_DMR_UPD_009_SUB_ET
- Created permutation TC_CSE_DMR_UPD_009_GRP_ET
- Created test case TC_CSE_DIS_002
- Created permutation TC_CSE_DIS_008_CRB_CRA
- Created permutation TC_CSE_DIS_008_MS_US
- Created permutation TC_CSE_DIS_008_STS_STB
- Created permutation TC_CSE_DIS_008_EXB_EXA
- Created test case TC_CSE_DIS_009
Signed-off-by: Antonio Castillo Verdugo's avataracverdugo <acverdugo@at4wireless.com>
parent 2340db41
......@@ -1312,7 +1312,7 @@ module OneM2M_Templates {
accessControlRule_list := {valueof(m_createAcr(p_acor, p_allowedOperations))}
},//M
selfPrivileges := {
accessControlRule_list := {valueof(m_createAcr({"all"}, int63))}
accessControlRule_list := {valueof(m_createAcr(p_acor, int63))}
},//M
choice := omit //NP
};
......
......@@ -3071,6 +3071,10 @@ module OneM2M_PermutationFunctions {
f_cse_preamble_subscriptionVerification(v_ae2Index, p_requestPrimitive, p_resourceType);
v_resourceIndex := f_cse_createResource(p_resourceType, p_requestPrimitive);//under the CSEBase resource
if (p_resourceType==int2){
v_aeIndex := v_resourceIndex;
}
} else { //ResourceType = RemoteCSE
......@@ -3135,7 +3139,11 @@ module OneM2M_PermutationFunctions {
}
// Test component configuration
f_cf01Up(true);
if (p_resourceType!=int16){ //ResourceType != RemoteCSE
f_cf01Up(true);
} else {
f_cf02Up();
}
// Test adapter configuration
......@@ -4470,6 +4478,62 @@ module OneM2M_PermutationFunctions {
f_cf01Down();
}//end f_CSE_DMR_UPD_008
function f_CSE_DMR_UPD_009(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive, template (omit) AttributeAux_list p_nullFields := omit) runs on AeSimu {
// Local variables
var MsgIn v_response;
var RequestPrimitive v_request;
var integer v_aeIndex := -1;
var integer v_resourceIndex := -1;
var integer v_ae2Index := -1;
// Test control
// Test component configuration
f_cf01Up(true);
// Test adapter configuration
// Preamble
v_aeIndex := f_cse_preamble_registerAe();//c_CRUDNDi);
f_cse_preamble_subscriptionVerification(v_ae2Index, p_createRequestPrimitive, p_resourceType);
v_resourceIndex := f_cse_createResource(p_resourceType, p_createRequestPrimitive, v_aeIndex);
// Test Body
v_request := f_getUpdateRequestPrimitive(p_resourceType, v_resourceIndex, p_updateRequestPrimitive);
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int4102))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Operation not allowed. Attribute not updated with an unacceptable value");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) -> value v_response {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Attribute has been updated with an unacceptable value");
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while updating resource type " & int2str(enum2int(p_resourceType)));
}
}
vc_primitiveContentRetrievedResource := f_cse_retrieveResource(v_resourceIndex);
// Postamble
f_cse_postamble_deleteResources();
// Tear down
f_cf01Down();
}//end f_CSE_DMR_UPD_009
function f_CSE_DMR_UPD_014(ResourceType p_resourceType, template RequestPrimitive p_createRequestPrimitive, template RequestPrimitive p_updateRequestPrimitive) runs on AeSimu {
......@@ -5401,6 +5465,59 @@ module OneM2M_PermutationFunctions {
} // end group Group_Managment
group Discovery {
function f_CSE_DIS_008(in FilterCriteria p_filterCriteria) runs on AeSimu {
//Local variables
var MsgIn v_response;
var integer v_aeIndex := -1;
var integer v_resourceIndex := -1;
var RequestPrimitive v_request;
var integer v_childResourceIndex := -1;
const ResourceType c_containerResourceType := int3;
// Test control
// Test component configuration
f_cf01Up();
// Test adapter configuration
// Preamble
v_aeIndex := f_cse_preamble_registerAe();//AE1 is registred;
v_resourceIndex := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_aeIndex);
v_childResourceIndex := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_resourceIndex);
v_request := valueof(m_retrieveFilterUsageOption(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex), int1));
v_request.filterCriteria := p_filterCriteria;
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int4102))) -> value v_response {
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": Contents Unacceptable");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code while retrieving resource");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response while retrieving resource");
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while retrieving resource");
}
}
// Postamble
f_cse_postamble_deleteResources();
// Tear down
f_cf01Down();
} // end f_CSE_DIS_008
} //end group Group Discovery
......
......@@ -124,7 +124,7 @@ module OneM2M_TestControl_IN_profile {
if(true) {execute (TC_CSE_DMR_UPD_005_CNT_EXC());}
if(true) {execute (TC_CSE_DMR_UPD_007_CNT_CT());}
if(true) {execute (TC_CSE_DMR_UPD_008_CNT_ET());}
//if(true) {execute (TC_CSE_DMR_UPD_009_CNT_LBL());}//TODO TO BE IMPLEMENTED
if(true) {execute (TC_CSE_DMR_UPD_009_CNT_ET());}
if(true) {execute (TC_CSE_DMR_UPD_016_CNT_ET());}
if(true) {execute (TC_CSE_DMR_DEL_001_CNT());}
if(true) {execute (TC_CSE_DMR_DEL_006());}
......@@ -181,7 +181,7 @@ module OneM2M_TestControl_IN_profile {
if(true) {execute (TC_CSE_DMR_UPD_005_SUB_MNI());}
if(true) {execute (TC_CSE_DMR_UPD_007_SUB_CT());}
if(true) {execute (TC_CSE_DMR_UPD_008_SUB_ET());}
//if(true) {execute (TC_CSE_DMR_UPD_009_SUB_LBL());}TODO TO BE IMPLEMENTED
if(true) {execute (TC_CSE_DMR_UPD_009_SUB_ET());}
if(true) {execute (TC_CSE_DMR_UPD_016_SUB_ET());}
if(true) {execute (TC_CSE_DMR_UPD_016_SUB_NU());}
if(true) {execute (TC_CSE_DMR_UPD_016_SUB_NCT());}
......@@ -214,7 +214,7 @@ module OneM2M_TestControl_IN_profile {
if(true) {execute (TC_CSE_DMR_UPD_005_ACP_EXC());}
if(true) {execute (TC_CSE_DMR_UPD_007_ACP_CT());}
if(true) {execute (TC_CSE_DMR_UPD_008_ACP_ET());}
//if(true) {execute (TC_CSE_DMR_UPD_009_ACP_LBL());} TODO TO BE IMPLEMENTED
if(true) {execute (TC_CSE_DMR_UPD_009_ACP_ET());}
if(true) {execute (TC_CSE_DMR_UPD_016_ACP_ET());}
if(true) {execute (TC_CSE_DMR_UPD_016_ACP_PV());}
if(true) {execute (TC_CSE_DMR_UPD_016_ACP_PVS());}
......@@ -245,7 +245,7 @@ module OneM2M_TestControl_IN_profile {
if(true) {execute (TC_CSE_DMR_RET_014_ACP());}
if(true) {execute (TC_CSE_DMR_RET_014_AE());}
if(true) {execute (TC_CSE_DMR_RET_014_CNT());}
//if(true) {execute (TC_CSE_DMR_RET_014_CSR());} TODO TO BE IMPLEMENTED
if(true) {execute (TC_CSE_DMR_RET_014_CSR());}
if(true) {execute (TC_CSE_DMR_RET_014_SUB());}
if(true) {execute (TC_CSE_DMR_UPD_006_CNT_LBL());}
if(true) {execute (TC_CSE_DMR_UPD_006_ACP_LBL());}
......@@ -305,14 +305,17 @@ module OneM2M_TestControl_IN_profile {
//Extendable Feature set
if(true) {execute (TC_CSE_DIS_001());}
//if(true) {execute (TC_CSE_DIS_002());}//TO BE IMPLEMENTED
if(true) {execute (TC_CSE_DIS_002());}
if(true) {execute (TC_CSE_DIS_003());}
if(true) {execute (TC_CSE_DIS_004());}
if(true) {execute (TC_CSE_DIS_005());}
if(true) {execute (TC_CSE_DIS_006());}
if(true) {execute (TC_CSE_DIS_007());}
//if(true) {execute (TC_CSE_DIS_008());}//TO BE IMPLEMENTED
//if(true) {execute (TC_CSE_DIS_009());}//TO BE IMPLEMENTED
if(true) {execute (TC_CSE_DIS_008_CRB_CRA());}
if(true) {execute (TC_CSE_DIS_008_MS_US());}
if(true) {execute (TC_CSE_DIS_008_STS_STB());}
if(true) {execute (TC_CSE_DIS_008_EXB_EXA());}
if(true) {execute (TC_CSE_DIS_009());}
if(true) {execute (TC_CSE_DMR_CRE_001_GRP_CB());}
if(true) {execute (TC_CSE_DMR_CRE_001_GRP_AE());}
if(true) {execute (TC_CSE_DMR_CRE_002_GRP());}
......@@ -330,7 +333,7 @@ module OneM2M_TestControl_IN_profile {
if(true) {execute (TC_CSE_DMR_UPD_006_GRP_LBL());}
if(true) {execute (TC_CSE_DMR_UPD_007_GRP_CT());}
if(true) {execute (TC_CSE_DMR_UPD_008_GRP_ET());}
//if(true) {execute (TC_CSE_DMR_UPD_009_GRP_LBL());}//TO BE IMPLEMENTED
if(true) {execute (TC_CSE_DMR_UPD_009_GRP_ET());}
if(true) {execute (TC_CSE_DMR_UPD_016_GRP_ET());}
if(true) {execute (TC_CSE_DMR_UPD_016_GRP_MNM());}
if(true) {execute (TC_CSE_DMR_UPD_016_GRP_MID());}
......
......@@ -148,7 +148,7 @@ module OneM2M_TestControl_MN_profile {
if(true) {execute (TC_CSE_DMR_UPD_005_CNT_EXC());}
if(true) {execute (TC_CSE_DMR_UPD_007_CNT_CT());}
if(true) {execute (TC_CSE_DMR_UPD_008_CNT_ET());}
//if(true) {execute (TC_CSE_DMR_UPD_009_CNT_LBL());}//TODO TO BE IMPLEMENTED
if(true) {execute (TC_CSE_DMR_UPD_009_CNT_ET());}
if(true) {execute (TC_CSE_DMR_UPD_016_CNT_ET());}
if(true) {execute (TC_CSE_DMR_DEL_001_CNT());}
if(true) {execute (TC_CSE_DMR_DEL_006());}
......@@ -205,7 +205,7 @@ module OneM2M_TestControl_MN_profile {
if(true) {execute (TC_CSE_DMR_UPD_005_SUB_MNI());}
if(true) {execute (TC_CSE_DMR_UPD_007_SUB_CT());}
if(true) {execute (TC_CSE_DMR_UPD_008_SUB_ET());}
//if(true) {execute (TC_CSE_DMR_UPD_009_SUB_LBL());}TODO TO BE IMPLEMENTED
if(true) {execute (TC_CSE_DMR_UPD_009_SUB_ET());}
if(true) {execute (TC_CSE_DMR_UPD_016_SUB_ET());}
if(true) {execute (TC_CSE_DMR_UPD_016_SUB_NU());}
if(true) {execute (TC_CSE_DMR_UPD_016_SUB_NCT());}
......@@ -238,15 +238,15 @@ module OneM2M_TestControl_MN_profile {
if(true) {execute (TC_CSE_DMR_UPD_005_ACP_EXC());}
if(true) {execute (TC_CSE_DMR_UPD_007_ACP_CT());}
if(true) {execute (TC_CSE_DMR_UPD_008_ACP_ET());}
//if(true) {execute (TC_CSE_DMR_UPD_009_ACP_LBL());} TODO TO BE IMPLEMENTED
if(true) {execute (TC_CSE_DMR_UPD_009_ACP_ET());}
if(true) {execute (TC_CSE_DMR_UPD_016_ACP_ET());}
if(true) {execute (TC_CSE_DMR_UPD_016_ACP_PV());}
if(true) {execute (TC_CSE_DMR_UPD_016_ACP_PVS());}
if(true) {execute (TC_CSE_DMR_DEL_001_ACP());}
if(true) {execute (TC_CSE_SEC_ACP_CRE_001());}
if(true) {execute (TC_CSE_SEC_ACP_CRE_002());}
//if(true) {execute (TC_CSE_SEC_ACP_CRE_003());} TODO TO BE IMPLEMENTED
//if(true) {execute (TC_CSE_SEC_ACP_CRE_004());} TODO TO BE IMPLEMENTED
if(true) {execute (TC_CSE_SEC_ACP_CRE_003());}
if(true) {execute (TC_CSE_SEC_ACP_CRE_004());}
if(true) {execute (TC_CSE_DMR_CRE_012_ACP_LBL());}
if(true) {execute (TC_CSE_DMR_UPD_014_ACP_LBL());}
if(true) {execute (TC_CSE_DMR_UPD_015_ACP_LBL());}
......@@ -269,7 +269,7 @@ module OneM2M_TestControl_MN_profile {
if(true) {execute (TC_CSE_DMR_RET_014_ACP());}
if(true) {execute (TC_CSE_DMR_RET_014_AE());}
if(true) {execute (TC_CSE_DMR_RET_014_CNT());}
//if(true) {execute (TC_CSE_DMR_RET_014_CSR());} TODO TO BE IMPLEMENTED
if(true) {execute (TC_CSE_DMR_RET_014_CSR());}
if(true) {execute (TC_CSE_DMR_RET_014_SUB());}
if(true) {execute (TC_CSE_DMR_UPD_006_CNT_LBL());}
if(true) {execute (TC_CSE_DMR_UPD_006_ACP_LBL());}
......@@ -329,14 +329,17 @@ module OneM2M_TestControl_MN_profile {
//Extendable Feature set
if(true) {execute (TC_CSE_DIS_001());}
//if(true) {execute (TC_CSE_DIS_002());}//TO BE IMPLEMENTED
if(true) {execute (TC_CSE_DIS_002());}
if(true) {execute (TC_CSE_DIS_003());}
if(true) {execute (TC_CSE_DIS_004());}
if(true) {execute (TC_CSE_DIS_005());}
if(true) {execute (TC_CSE_DIS_006());}
if(true) {execute (TC_CSE_DIS_007());}
//if(true) {execute (TC_CSE_DIS_008());}//TO BE IMPLEMENTED
//if(true) {execute (TC_CSE_DIS_009());}//TO BE IMPLEMENTED
if(true) {execute (TC_CSE_DIS_008_CRB_CRA());}
if(true) {execute (TC_CSE_DIS_008_MS_US());}
if(true) {execute (TC_CSE_DIS_008_STS_STB());}
if(true) {execute (TC_CSE_DIS_008_EXB_EXA());}
if(true) {execute (TC_CSE_DIS_009());}
if(true) {execute (TC_CSE_DMR_CRE_001_GRP_CB());}
if(true) {execute (TC_CSE_DMR_CRE_001_GRP_AE());}
if(true) {execute (TC_CSE_DMR_CRE_002_GRP());}
......@@ -353,7 +356,7 @@ module OneM2M_TestControl_MN_profile {
if(true) {execute (TC_CSE_DMR_UPD_006_GRP_LBL());}
if(true) {execute (TC_CSE_DMR_UPD_007_GRP_CT());}
if(true) {execute (TC_CSE_DMR_UPD_008_GRP_ET());}
//if(true) {execute (TC_CSE_DMR_UPD_009_GRP_LBL());}//TO BE IMPLEMENTED
if(true) {execute (TC_CSE_DMR_UPD_009_GRP_ET());}
if(true) {execute (TC_CSE_DMR_UPD_016_GRP_ET());}
if(true) {execute (TC_CSE_DMR_UPD_016_GRP_MNM());}
if(true) {execute (TC_CSE_DMR_UPD_016_GRP_MID());}
......
......@@ -3974,6 +3974,15 @@ module OneM2M_Testcases_CSE_Release_1 {
v_ae1.start(f_CSE_DMR_RET_014(int3, m_createContainerBase));//Container
v_ae1.done;
}
testcase TC_CSE_DMR_RET_014_CSR() runs on Tester system CseSystem {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
v_ae1.start(f_CSE_DMR_RET_014(int16, m_createRemoteCSEBase));//RemoteCSE
v_ae1.done;
}
testcase TC_CSE_DMR_RET_014_GRP() runs on Tester system CseSystem {
// Local variables
......@@ -5138,7 +5147,107 @@ module OneM2M_Testcases_CSE_Release_1 {
}
}
} // end g_CSE_DMR_UPD_008
} // end g_CSE_DMR_UPD_008
group g_CSE_DMR_UPD_009{
/**
* @desc Check that the IUT responds with an error when the AE tries to update a RW attribute ATTRIBUTE_NAME of the TARGET_RESOURCE_ADDRESS resource with an UNACCEPTABLE_VALUE
*
*/
testcase TC_CSE_DMR_UPD_009_CNT_ET() runs on Tester system CseSystem {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var Timestamp v_expirationTime := "20001231T012345";
var template RequestPrimitive v_updateRequest := m_updateContainerBase;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.container.expirationTime := v_expirationTime;
v_ae1.start(f_CSE_DMR_UPD_009(int3, m_createContainerBase, v_updateRequest));//Container
v_ae1.done;
if(getverdict == pass){
v_primitiveContentRetrieveResource := f_getPrimitiveContentRetrievedResource(v_ae1);
//Check that the resource has NOT been udpated
if(ischosen(v_primitiveContentRetrieveResource.container)) {
if(v_primitiveContentRetrieveResource.container.expirationTime == v_expirationTime){
setverdict(fail, __SCOPE__ & ": Error: Expiration time attribute updated")
}
}
}
}
testcase TC_CSE_DMR_UPD_009_ACP_ET() runs on Tester system CseSystem {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var Timestamp v_expirationTime := "20001231T012345";
var template RequestPrimitive v_updateRequest := m_updateAcpBase;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.accessControlPolicy.expirationTime := v_expirationTime;
v_ae1.start(f_CSE_DMR_UPD_009(int1, m_createAcpBase, v_updateRequest));//AccessControlPolicy
v_ae1.done;
if(getverdict == pass){
v_primitiveContentRetrieveResource := f_getPrimitiveContentRetrievedResource(v_ae1);
//Check that the resource has NOT been udpated
if(ischosen(v_primitiveContentRetrieveResource.accessControlPolicy)) {
if(v_primitiveContentRetrieveResource.accessControlPolicy.expirationTime == v_expirationTime){
setverdict(fail, __SCOPE__ & ": Error: Expiration time attribute updated")
}
}
}
}
testcase TC_CSE_DMR_UPD_009_SUB_ET() runs on Tester system CseSystem {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var Timestamp v_expirationTime := "20001231T012345";
var template RequestPrimitive v_updateRequest := m_updateSubscriptionBase;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.subscription.expirationTime := v_expirationTime;
v_ae1.start(f_CSE_DMR_UPD_009(int23, m_createSubscriptionBase, v_updateRequest));//Subscription
v_ae1.done;
if(getverdict == pass){
v_primitiveContentRetrieveResource := f_getPrimitiveContentRetrievedResource(v_ae1);
//Check that the resource has NOT been udpated
if(ischosen(v_primitiveContentRetrieveResource.subscription)) {
if(v_primitiveContentRetrieveResource.subscription.expirationTime == v_expirationTime){
setverdict(fail, __SCOPE__ & ": Error: Expiration time attribute updated")
}
}
}
}
testcase TC_CSE_DMR_UPD_009_GRP_ET() runs on Tester system CseSystem {
// Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var Timestamp v_expirationTime := "20001231T012345";
var template RequestPrimitive v_updateRequest := m_updateGroupBase;
var PrimitiveContent v_primitiveContentRetrieveResource;
v_updateRequest.primitiveContent.group_.expirationTime := v_expirationTime;
v_ae1.start(f_CSE_DMR_UPD_009(int9, m_createGroupBase, v_updateRequest));//Group
v_ae1.done;
if(getverdict == pass){
v_primitiveContentRetrieveResource := f_getPrimitiveContentRetrievedResource(v_ae1);
//Check that the resource has NOT been udpated
if(ischosen(v_primitiveContentRetrieveResource.group_)) {
if(v_primitiveContentRetrieveResource.group_.expirationTime == v_expirationTime){
setverdict(fail, __SCOPE__ & ": Error: Expiration time attribute updated")
}
}
}
}
} // end g_CSE_DMR_UPD_009
group g_CSE_DMR_UPD_011{
......@@ -8613,6 +8722,68 @@ module OneM2M_Testcases_CSE_Release_1 {
// Tear down
f_cf01Down();
} // end TC_CSE_DIS_001
/**
* @desc Check that the IUT returns successfully appropriate list of discovered resource when the filter criteria is provided in the request
*
*/
testcase TC_CSE_DIS_002() runs on AeSimu system CseSystem {
// Local variables
var MsgIn v_response;
var integer v_aeIndex := -1;
var integer v_resourceIndex := -1;
var RequestPrimitive v_request;
var integer v_childResourceIndex := -1;
const ResourceType c_containerResourceType := int3;
var Labels v_labels := {"VALUE_1"};
var template RequestPrimitive v_createRequest := m_createContainerBase;
// Test control
// Test component configuration
f_cf01Up();
// Test adapter configuration
// Preamble
v_aeIndex := f_cse_preamble_registerAe();//AE1 is registred;
v_resourceIndex := f_cse_createResource(c_containerResourceType, m_createContainerBase, v_aeIndex);
v_createRequest.primitiveContent.container.labels := v_labels;
v_childResourceIndex := f_cse_createResource(c_containerResourceType, v_createRequest, v_resourceIndex);
v_request := valueof(m_retrieveFilterUsageOptionLabel(f_getResourceAddress(v_resourceIndex), f_getOriginator(v_resourceIndex), int1, v_labels));
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responseDiscovery)) -> value v_response {
tc_ac.stop;
if(lengthof(v_response.primitive.responsePrimitive.primitiveContent.uRIList) == 1){
setverdict(pass, __SCOPE__ & ": List of discovered resources successfully returned");
}
else
{
setverdict(fail, __SCOPE__ & ": Wrong content available in URIList element");
}
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveOK)) {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Wrong response status code");
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error while retrieving resource");
}
[] tc_ac.timeout {
setverdict(fail, __SCOPE__ & ": No answer while retrieving resource");
}
}
// Postamble
f_cse_postamble_deleteResources();
// Tear down
f_cf01Down();
} // end TC_CSE_DIS_002
/**
* @desc Check that the IUT returns the empty address list when no result matching with filter criteria is discovered
......@@ -8906,6 +9077,138 @@ module OneM2M_Testcases_CSE_Release_1 {
// Tear down
f_cf01Down();
} // end TC_CSE_DIS_007
group g_CSE_DIS_008{
/**
* @desc Check that the IUT responds the originator with an error when the originator sends a request to discover the resource TARGET_RESOURCE_ADDRESS including two conflicted filter criteria of different type FILTER_CRITERIA_CONDITION_1 and FILTER_CRITERIA_CONDITION_2 (E.G. createBefore < createdAfter)
*
*/
testcase TC_CSE_DIS_008_CRB_CRA() runs on AeSimu system CseSystem {
//Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var FilterCriteria v_filterCriteria;
v_filterCriteria.createdBefore := "20171231T012345";
v_filterCriteria.createdAfter := "20181231T012345";
v_ae1.start(f_CSE_DIS_008(v_filterCriteria));
v_ae1.done;
}
testcase TC_CSE_DIS_008_MS_US() runs on AeSimu system CseSystem {
//Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var FilterCriteria v_filterCriteria;
v_filterCriteria.unmodifiedSince := "20171231T012345";
v_filterCriteria.modifiedSince := "20181231T012345";
v_ae1.start(f_CSE_DIS_008(v_filterCriteria));
v_ae1.done;
}
testcase TC_CSE_DIS_008_STS_STB() runs on AeSimu system CseSystem {
//Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var FilterCriteria v_filterCriteria;
v_filterCriteria.stateTagSmaller := 1;
v_filterCriteria.stateTagBigger := 2;
v_ae1.start(f_CSE_DIS_008(v_filterCriteria));
v_ae1.done;
}
testcase TC_CSE_DIS_008_EXB_EXA() runs on AeSimu system CseSystem {
//Local variables
var AeSimu v_ae1 := AeSimu.create("AE1") alive;
var FilterCriteria v_filterCriteria;
v_filterCriteria.expireBefore := "20171231T012345";
v_filterCriteria.expireAfter := "20181231T012345";
v_ae1.start(f_CSE_DIS_008(v_filterCriteria));
v_ae1.done;
}
} // end TC_CSE_DIS_008
/**
* @desc Check that the IUT returns the empty address list when resources match the filter criteria but they do not include DISCOVERY permission
*
*/
testcase TC_CSE_DIS_009() runs on AeSimu system CseSystem {
// Local variables
var MsgIn v_response;
var integer v_aeIndex := -1;
var integer v_resourceIndex := -1;
var integer v_acpAuxIndex := -1;
var RequestPrimitive v_request;
const ResourceType c_containerResourceType := int3;
var Labels v_labels := {"VALUE_1"};
var template RequestPrimitive v_createRequest := m_createContainerBase;
// Test control
// Test component configuration
f_cf01Up();
// Test adapter configuration
// Preamble
v_acpAuxIndex := f_cse_preamble_createAcpAux(-, -);//c_CRUDNDi)
//v_aeIndex := f_cse_preamble_registerAe({f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)});
v_aeIndex := f_cse_preamble_registerAe();
f_cse_updateAcpAuxResource(int31); //Not include DISCOVERY permission
v_createRequest.primitiveContent.container.accessControlPolicyIDs := {f_getResourceId(vc_resourcesList[v_acpAuxIndex].resource)};
v_createRequest.primitiveContent.container.labels := v_labels;
v_resourceIndex := f_cse_createResource(c_containerResourceType, v_createRequest, v_aeIndex);
v_request := valueof(m_retrieveFilterUsageOptionLabel(f_getResourceAddress(v_aeIndex), f_getOriginator(v_resourceIndex), int1, v_labels));
mcaPort.send(m_request(v_request));
tc_ac.start;
alt {
[] mcaPort.receive(mw_response(mw_responseDiscovery)) -> value v_response {
tc_ac.stop;
if(ispresent(v_response.primitive.responsePrimitive.primitiveContent)){
setverdict(fail, __SCOPE__ & ": Content is not empty");
}
else
{