Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
TST
ATS
Commits
03e1ee11
Commit
03e1ee11
authored
Mar 21, 2019
by
Miguel Angel Reina Ortega
Browse files
Merge branch 'Release2' into AE_REGISTRATION_FROM_SET_TO_S_DEBUGGING
Signed-off-by:
reinaortega
<
miguelangel.reinaortega@etsi.org
>
parents
3ecd90fb
3e7fff46
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
782 additions
and
25 deletions
+782
-25
LibOneM2M/OneM2M_Functions.ttcn
LibOneM2M/OneM2M_Functions.ttcn
+55
-14
LibOneM2M/OneM2M_Templates.ttcn
LibOneM2M/OneM2M_Templates.ttcn
+1
-1
OneM2M_PermutationFunctions.ttcn
OneM2M_PermutationFunctions.ttcn
+425
-5
OneM2M_Testcases_CSE_Release_1.ttcn
OneM2M_Testcases_CSE_Release_1.ttcn
+4
-1
OneM2M_Testcases_CSE_Release_2.ttcn
OneM2M_Testcases_CSE_Release_2.ttcn
+297
-4
No files found.
LibOneM2M/OneM2M_Functions.ttcn
View file @
03e1ee11
...
...
@@ -1097,20 +1097,22 @@ module OneM2M_Functions {
}
if
(
not
(
v_deregistrationPerformed
))
{
//Deregistration by Registree (IUT) - Send trigger message for deregistration
v_utRequest
.
requestPrimitive
.
to_
:=
f_getLocalResourceAddress
(
vc_localRemoteCseIndex
);
f_sendUtPrimitive
(
v_utRequest
,
v_action
&
f_getLocalResourceAddress
(
vc_localRemoteCseIndex
));
tc_ac
.
start
;
alt
{
[]
mccPortIn
.
receive
(
mw_request
(
mw_delete
(
f_getLocalResourceAddress
(
vc_localRemoteCseIndex
))))
->
value
vc_request
{
tc_ac
.
stop
;
f_processDeleteRequestPrimitive
(
vc_request
.
primitive
.
requestPrimitive
);
mccPortIn
.
send
(
f_getMsgOutPrimitive
(
m_response
(
vc_response
.
primitive
.
responsePrimitive
)));
log
(
__SCOPE__
&
": INFO: Deregistration performed successfully"
);
}
[]
tc_ac
.
timeout
{
log
(
__SCOPE__
&
": INFO: No deregistration performed"
);
if
(
vc_localRemoteCseIndex
!=
-
1
)
{
//Deregistration by Registree (IUT) - Send trigger message for deregistration
v_utRequest
.
requestPrimitive
.
to_
:=
f_getLocalResourceAddress
(
vc_localRemoteCseIndex
);
f_sendUtPrimitive
(
v_utRequest
,
v_action
&
f_getLocalResourceAddress
(
vc_localRemoteCseIndex
));
tc_ac
.
start
;
alt
{
[]
mccPortIn
.
receive
(
mw_request
(
mw_delete
(
f_getLocalResourceAddress
(
vc_localRemoteCseIndex
))))
->
value
vc_request
{
tc_ac
.
stop
;
f_processDeleteRequestPrimitive
(
vc_request
.
primitive
.
requestPrimitive
);
mccPortIn
.
send
(
f_getMsgOutPrimitive
(
m_response
(
vc_response
.
primitive
.
responsePrimitive
)));
log
(
__SCOPE__
&
": INFO: Deregistration performed successfully"
);
}
[]
tc_ac
.
timeout
{
log
(
__SCOPE__
&
": INFO: No deregistration performed"
);
}
}
}
}
...
...
@@ -5290,6 +5292,45 @@ module OneM2M_Functions {
//log("result: " & result);
return
result
;
}
/**
* @desc Replace the CSE-Name by the shortcut ("-") in a structured resource id format
* @return Cleaned-up resourceID
*/
function
f_useShortcutInResourceId
(
in
XSD
.
ID
p_resourceID
)
return
XSD
.
ID
{
var
integer
v_length
:=
lengthof
(
p_resourceID
);
var
integer
i
;
var
integer
v_numberOfSlashes
:=
0
;
var
XSD
.
ID
v_modifiedResourceId
:=
""
;
var
XSD
.
ID
v_cseName
:=
""
;
if
(
p_resourceID
[
0
]
==
"/"
)
{
if
(
p_resourceID
[
1
]
==
"/"
)
{
v_numberOfSlashes
:=
4
;
}
else
{
v_numberOfSlashes
:=
2
;
}
}
//log("p_resourceID: " & p_resourceID);
for
(
i
:=
0
;
i
<
v_length
;
i
:=
i
+
1
){
if
(
v_numberOfSlashes
!=
0
)
{
if
(
p_resourceID
[
i
]
==
"/"
){
v_numberOfSlashes
:=
v_numberOfSlashes
-
1
;
}
v_modifiedResourceId
:=
v_modifiedResourceId
&
p_resourceID
[
i
];
}
else
if
(
v_numberOfSlashes
==
0
){
if
(
p_resourceID
[
i
]
==
"/"
){
v_numberOfSlashes
:=
v_numberOfSlashes
-
1
;
v_modifiedResourceId
:=
v_modifiedResourceId
&
"-/"
;
log
(
__SCOPE__
,
"INFO: CSE Name to be removed from resource ID: "
&
v_cseName
);
}
v_cseName
:=
v_cseName
&
p_resourceID
[
i
];
}
else
if
(
v_numberOfSlashes
==
-
1
){
v_modifiedResourceId
:=
v_modifiedResourceId
&
p_resourceID
[
i
];
}
}
return
v_modifiedResourceId
;
}
/**
* @desc It removes the poa from a given url
...
...
LibOneM2M/OneM2M_Templates.ttcn
View file @
03e1ee11
...
...
@@ -435,7 +435,7 @@ module OneM2M_Templates {
sizeBelow
:=
omit
,
contentType_list
:=
{},
attribute_list
:=
{},
filterUsage
:=
omit
,
filterUsage
:=
int1
,
limit
:=
omit
,
semanticsFilter_list
:=
{},
filterOperation
:=
omit
,
...
...
OneM2M_PermutationFunctions.ttcn
View file @
03e1ee11
...
...
@@ -826,7 +826,7 @@ module OneM2M_PermutationFunctions {
v_resourceIndex
:=
f_cse_createResource
(
int3
,
m_createContainerBase
,
v_aeIndex
);
// Test Body
//Force usage of
Non-
Hierarchical addressing method
//Force usage of Hierarchical addressing method
v_addressingMethod
:=
e_hierarchical
;
v_primitiveScope
:=
p_primitiveScope
;
v_request
:=
f_getCreateRequestPrimitive
(
int3
,
m_createContainerBase
,
v_resourceIndex
);
...
...
@@ -862,6 +862,68 @@ module OneM2M_PermutationFunctions {
function
f_CSE_GEN_CRE_003
(
in
PrimitiveScope
p_primitiveScope
)
runs
on
AeSimu
{
// Local variables
var
RequestPrimitive
v_request
;
var
integer
v_aeIndex
:=
-
1
;
var
integer
v_resourceIndex
:=
-
1
;
var
AddressingMethod
v_addressingMethod
;
var
PrimitiveScope
v_primitiveScope
;
var
XSD
.
ID
v_cseName
:=
PX_CSE_NAME
;
// Test control
if
(
not
(
PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT
))
{
setverdict
(
inconc
,
__SCOPE__
&
": Structured-CSE-Relative-Resource-ID format support is required to run this test case"
);
stop
;
}
// Test component configuration
f_cf01Up
();
// Test adapter configuration
// Preamble
v_aeIndex
:=
f_cse_preamble_registerAe
();
//c_CRUDNDi);
v_resourceIndex
:=
f_cse_createResource
(
int3
,
m_createContainerBase
,
v_aeIndex
);
// Test Body
//Force usage of Non-Hierarchical addressing method
v_addressingMethod
:=
e_hierarchical
;
v_primitiveScope
:=
p_primitiveScope
;
v_request
:=
f_getCreateRequestPrimitive
(
int3
,
m_createContainerBase
,
v_resourceIndex
);
v_request
.
to_
:=
f_useShortcutInResourceId
(
f_getResourceAddress
(
v_resourceIndex
,
v_addressingMethod
,
v_primitiveScope
));
mcaPort
.
send
(
f_getMsgOutPrimitive
(
m_request
(
v_request
)));
tc_ac
.
start
;
alt
{
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitive
(
int2001
)))
{
tc_ac
.
stop
;
setverdict
(
pass
,
__SCOPE__
&
": Container resource created using shortcut in hierarchical addressing method"
);
}
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitiveOK
))
{
tc_ac
.
stop
;
setverdict
(
fail
,
__SCOPE__
&
": Wrong response status code in the response"
);
}
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitiveKO
))
{
tc_ac
.
stop
;
setverdict
(
fail
,
__SCOPE__
&
": Error while creating container resource using shortcut in hierarchical addressing method"
);
}
[]
tc_ac
.
timeout
{
setverdict
(
fail
,
__SCOPE__
&
": No answer while creating resource"
);
}
}
// Postamble
f_cse_postamble_deleteResources
();
// Tear down
f_cf01Down
();
}
//end f_CSE_GEN_CRE_003
function
f_CSE_GEN_CRE_004
(
in
PrimitiveScope
p_primitiveScope
)
runs
on
AeSimu
{
// Local variables
var
RequestPrimitive
v_request
;
var
integer
v_aeIndex
:=
-
1
;
...
...
@@ -918,7 +980,7 @@ module OneM2M_PermutationFunctions {
// Tear down
f_cf01Down
();
}
//end f_CSE_GEN_CRE_00
3
}
//end f_CSE_GEN_CRE_00
4
}
// end of group Create
...
...
@@ -1007,7 +1069,7 @@ module OneM2M_PermutationFunctions {
v_resourceIndex
:=
f_cse_createResource
(
int3
,
m_createContainerBase
,
v_aeIndex
);
// Test Body
//Force usage of
Non-
Hierarchical addressing method
//Force usage of Hierarchical addressing method
v_addressingMethod
:=
e_hierarchical
;
v_primitiveScope
:=
p_primitiveScope
;
...
...
@@ -1038,6 +1100,118 @@ module OneM2M_PermutationFunctions {
}
//end f_CSE_GEN_RET_002
function
f_CSE_GEN_RET_003
(
in
PrimitiveScope
p_primitiveScope
)
runs
on
AeSimu
{
// Local variables
var
integer
v_aeIndex
:=
-
1
;
var
integer
v_resourceIndex
:=
-
1
;
var
AddressingMethod
v_addressingMethod
;
var
PrimitiveScope
v_primitiveScope
;
// Test control
if
(
not
(
PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT
))
{
setverdict
(
inconc
,
__SCOPE__
&
": Structured-CSE-Relative-Resource-ID format support is required to run this test case"
);
stop
;
}
// Test component configuration
f_cf01Up
();
// Test adapter configuration
// Preamble
v_aeIndex
:=
f_cse_preamble_registerAe
();
//c_CRUDNDi);
v_resourceIndex
:=
f_cse_createResource
(
int3
,
m_createContainerBase
,
v_aeIndex
);
// Test Body
//Force usage of Non-Hierarchical addressing method
v_addressingMethod
:=
e_hierarchical
;
v_primitiveScope
:=
p_primitiveScope
;
mcaPort
.
send
(
f_getMsgOutPrimitive
(
m_request
(
m_retrieve
(
f_useShortcutInResourceId
(
f_getResourceAddress
(
v_resourceIndex
,
v_addressingMethod
,
v_primitiveScope
)),
f_getOriginator
(
v_resourceIndex
)))));
tc_ac
.
start
;
alt
{
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitive
(
int2000
)))
{
tc_ac
.
stop
;
setverdict
(
pass
,
__SCOPE__
&
": Container resource retrieved using shortcut in hierarchical addressing method"
);
}
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitiveOK
))
{
tc_ac
.
stop
;
setverdict
(
fail
,
__SCOPE__
&
": Wrong response status code in the response"
);
}
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitiveKO
))
{
tc_ac
.
stop
;
setverdict
(
fail
,
__SCOPE__
&
": Error while retrieving container resource using shortcut in hierarchical addressing method"
);
}
[]
tc_ac
.
timeout
{
setverdict
(
fail
,
__SCOPE__
&
": No answer while retrieving resource"
);
}
}
// Postamble
f_cse_postamble_deleteResources
();
// Tear down
f_cf01Down
();
}
//end f_CSE_GEN_RET_003
function
f_CSE_GEN_RET_004
(
in
PrimitiveScope
p_primitiveScope
)
runs
on
AeSimu
{
// Local variables
var
integer
v_aeIndex
:=
-
1
;
var
integer
v_resourceIndex
:=
-
1
;
var
AddressingMethod
v_addressingMethod
;
var
PrimitiveScope
v_primitiveScope
;
// Test control
if
(
not
(
PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT
))
{
setverdict
(
inconc
,
__SCOPE__
&
": Structured-CSE-Relative-Resource-ID format support is required to run this test case"
);
stop
;
}
// Test component configuration
f_cf01Up
();
// Test adapter configuration
// Preamble
v_aeIndex
:=
f_cse_preamble_registerAe
();
//c_CRUDNDi);
v_resourceIndex
:=
f_cse_createResource
(
int3
,
m_createContainerBase
,
v_aeIndex
);
// Test Body
//Force usage of Hybrid Hierarchical addressing method
v_addressingMethod
:=
e_hybrid
;
v_primitiveScope
:=
p_primitiveScope
;
mcaPort
.
send
(
f_getMsgOutPrimitive
(
m_request
(
m_retrieve
(
f_getResourceAddress
(
v_resourceIndex
,
v_addressingMethod
,
v_primitiveScope
),
f_getOriginator
(
v_resourceIndex
)))));
tc_ac
.
start
;
alt
{
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitive
(
int2000
)))
{
tc_ac
.
stop
;
setverdict
(
pass
,
__SCOPE__
&
": Container resource retrieved using hybrid addressing method"
);
}
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitiveOK
))
{
tc_ac
.
stop
;
setverdict
(
fail
,
__SCOPE__
&
": Wrong response status code in the response"
);
}
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitiveKO
))
{
tc_ac
.
stop
;
setverdict
(
fail
,
__SCOPE__
&
": Error while retrieving container resource using hybrid addressing method"
);
}
[]
tc_ac
.
timeout
{
setverdict
(
fail
,
__SCOPE__
&
": No answer while retrieving resource"
);
}
}
// Postamble
f_cse_postamble_deleteResources
();
// Tear down
f_cf01Down
();
}
//end f_CSE_GEN_RET_004
}
// end of group Retrieve
group
Update
{
...
...
@@ -1131,7 +1305,7 @@ module OneM2M_PermutationFunctions {
v_resourceIndex
:=
f_cse_createResource
(
int3
,
m_createContainerBase
,
v_aeIndex
);
// Test Body
//Force usage of
Non-
Hierarchical addressing method
//Force usage of Hierarchical addressing method
v_addressingMethod
:=
e_hierarchical
;
v_primitiveScope
:=
p_primitiveScope
;
...
...
@@ -1168,6 +1342,132 @@ module OneM2M_PermutationFunctions {
}
//end f_CSE_GEN_UPD_002
function
f_CSE_GEN_UPD_003
(
in
PrimitiveScope
p_primitiveScope
)
runs
on
AeSimu
{
// Local variables
var
RequestPrimitive
v_updateRequest
:=
valueof
(
m_updateContainerBase
);
var
integer
v_aeIndex
:=
-
1
;
var
integer
v_resourceIndex
:=
-
1
;
var
AddressingMethod
v_addressingMethod
;
var
PrimitiveScope
v_primitiveScope
;
// Test control
if
(
not
(
PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT
))
{
setverdict
(
inconc
,
__SCOPE__
&
": Structured-CSE-Relative-Resource-ID format support is required to run this test case"
);
stop
;
}
// Test component configuration
f_cf01Up
();
// Test adapter configuration
// Preamble
v_aeIndex
:=
f_cse_preamble_registerAe
();
//c_CRUDNDi);
v_resourceIndex
:=
f_cse_createResource
(
int3
,
m_createContainerBase
,
v_aeIndex
);
// Test Body
//Force usage of Non-Hierarchical addressing method
v_addressingMethod
:=
e_hierarchical
;
v_primitiveScope
:=
p_primitiveScope
;
v_updateRequest
.
primitiveContent
.
container
.
labels
:=
{
"MyLabel"
};
v_updateRequest
:=
f_getUpdateRequestPrimitive
(
int3
,
v_resourceIndex
,
v_updateRequest
);
v_updateRequest
.
to_
:=
f_useShortcutInResourceId
(
f_getResourceAddress
(
v_resourceIndex
,
v_addressingMethod
,
v_primitiveScope
));
mcaPort
.
send
(
f_getMsgOutPrimitive
(
m_request
(
v_updateRequest
)));
tc_ac
.
start
;
alt
{
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitive
(
int2004
)))
{
tc_ac
.
stop
;
setverdict
(
pass
,
__SCOPE__
&
": Container resource updated using shortcut in hierarchical addressing method"
);
}
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitiveOK
))
{
tc_ac
.
stop
;
setverdict
(
fail
,
__SCOPE__
&
": Wrong response status code in the response"
);
}
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitiveKO
))
{
tc_ac
.
stop
;
setverdict
(
fail
,
__SCOPE__
&
": Error while updating container resource using shortcut in hierarchical addressing method"
);
}
[]
tc_ac
.
timeout
{
setverdict
(
fail
,
__SCOPE__
&
": No answer while updating resource"
);
}
}
// Postamble
f_cse_postamble_deleteResources
();
// Tear down
f_cf01Down
();
}
//end f_CSE_GEN_UPD_003
function
f_CSE_GEN_UPD_004
(
in
PrimitiveScope
p_primitiveScope
)
runs
on
AeSimu
{
// Local variables
var
RequestPrimitive
v_updateRequest
:=
valueof
(
m_updateContainerBase
);
var
integer
v_aeIndex
:=
-
1
;
var
integer
v_resourceIndex
:=
-
1
;
var
AddressingMethod
v_addressingMethod
;
var
PrimitiveScope
v_primitiveScope
;
// Test control
if
(
not
(
PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT
))
{
setverdict
(
inconc
,
__SCOPE__
&
": Structured-CSE-Relative-Resource-ID format support is required to run this test case"
);
stop
;
}
// Test component configuration
f_cf01Up
();
// Test adapter configuration
// Preamble
v_aeIndex
:=
f_cse_preamble_registerAe
();
//c_CRUDNDi);
v_resourceIndex
:=
f_cse_createResource
(
int3
,
m_createContainerBase
,
v_aeIndex
);
// Test Body
//Force usage of Hybrid Hierarchical addressing method
v_addressingMethod
:=
e_hybrid
;
v_primitiveScope
:=
p_primitiveScope
;
v_updateRequest
.
primitiveContent
.
container
.
labels
:=
{
"MyLabel"
};
v_updateRequest
:=
f_getUpdateRequestPrimitive
(
int3
,
v_resourceIndex
,
v_updateRequest
);
v_updateRequest
.
to_
:=
f_getResourceAddress
(
v_resourceIndex
,
v_addressingMethod
,
v_primitiveScope
);
mcaPort
.
send
(
f_getMsgOutPrimitive
(
m_request
(
v_updateRequest
)));
tc_ac
.
start
;
alt
{
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitive
(
int2004
)))
{
tc_ac
.
stop
;
setverdict
(
pass
,
__SCOPE__
&
": Container resource updated using hierarchical addressing method"
);
}
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitiveOK
))
{
tc_ac
.
stop
;
setverdict
(
fail
,
__SCOPE__
&
": Wrong response status code in the response"
);
}
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitiveKO
))
{
tc_ac
.
stop
;
setverdict
(
fail
,
__SCOPE__
&
": Error while updating container resource using hierarchical addressing method"
);
}
[]
tc_ac
.
timeout
{
setverdict
(
fail
,
__SCOPE__
&
": No answer while updating resource"
);
}
}
// Postamble
f_cse_postamble_deleteResources
();
// Tear down
f_cf01Down
();
}
//end f_CSE_GEN_UPD_004
}
// end of group Update
group
Delete
{
...
...
@@ -1258,7 +1558,7 @@ module OneM2M_PermutationFunctions {
v_resourceIndex
:=
f_cse_createResource
(
int3
,
m_createContainerBase
,
v_aeIndex
);
// Test Body
//Force usage of
Non-
Hierarchical addressing method
//Force usage of Hierarchical addressing method
v_addressingMethod
:=
e_hierarchical
;
v_primitiveScope
:=
p_primitiveScope
;
...
...
@@ -1292,6 +1592,126 @@ module OneM2M_PermutationFunctions {
}
//end f_CSE_GEN_DEL_002
function
f_CSE_GEN_DEL_003
(
in
PrimitiveScope
p_primitiveScope
)
runs
on
AeSimu
{
// Local variables
var
RequestPrimitive
v_request
;
var
integer
v_aeIndex
:=
-
1
;
var
integer
v_resourceIndex
:=
-
1
;
var
AddressingMethod
v_addressingMethod
;
var
PrimitiveScope
v_primitiveScope
;
// Test control
if
(
not
(
PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT
))
{
setverdict
(
inconc
,
__SCOPE__
&
": Structured-CSE-Relative-Resource-ID format support is required to run this test case"
);
stop
;
}
// Test component configuration
f_cf01Up
();
// Test adapter configuration
// Preamble
v_aeIndex
:=
f_cse_preamble_registerAe
();
//c_CRUDNDi);
v_resourceIndex
:=
f_cse_createResource
(
int3
,
m_createContainerBase
,
v_aeIndex
);
// Test Body
//Force usage of Non-Hierarchical addressing method
v_addressingMethod
:=
e_hierarchical
;
v_primitiveScope
:=
p_primitiveScope
;
v_request
:=
valueof
(
m_delete
(
f_useShortcutInResourceId
(
f_getResourceAddress
(
v_resourceIndex
,
v_addressingMethod
,
v_primitiveScope
)),
f_getOriginator
(
v_resourceIndex
)));
mcaPort
.
send
(
f_getMsgOutPrimitive
(
m_request
(
v_request
)));
tc_ac
.
start
;
alt
{
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitive
(
int2002
)))
{
tc_ac
.
stop
;
setverdict
(
pass
,
__SCOPE__
&
": Container resource deleted using shortcut in hierarchical addressing method"
);
}
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitiveOK
))
{
tc_ac
.
stop
;
setverdict
(
fail
,
__SCOPE__
&
": Wrong response status code in the response"
);
}
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitiveKO
))
{
tc_ac
.
stop
;
setverdict
(
fail
,
__SCOPE__
&
": Error while deleting container resource using shortcut in hierarchical addressing method"
);
}
[]
tc_ac
.
timeout
{
setverdict
(
fail
,
__SCOPE__
&
": No answer while deleting resource"
);
}
}
// Postamble
f_cse_postamble_deleteResources
();
// Tear down
f_cf01Down
();
}
//end f_CSE_GEN_DEL_003
function
f_CSE_GEN_DEL_004
(
in
PrimitiveScope
p_primitiveScope
)
runs
on
AeSimu
{
// Local variables
var
RequestPrimitive
v_request
;
var
integer
v_aeIndex
:=
-
1
;
var
integer
v_resourceIndex
:=
-
1
;
var
AddressingMethod
v_addressingMethod
;
var
PrimitiveScope
v_primitiveScope
;
// Test control
if
(
not
(
PICS_STRUCTURED_CSE_RELATIVE_RESOURCE_ID_FORMAT
))
{
setverdict
(
inconc
,
__SCOPE__
&
": Structured-CSE-Relative-Resource-ID format support is required to run this test case"
);
stop
;
}
// Test component configuration
f_cf01Up
();
// Test adapter configuration
// Preamble
v_aeIndex
:=
f_cse_preamble_registerAe
();
//c_CRUDNDi);
v_resourceIndex
:=
f_cse_createResource
(
int3
,
m_createContainerBase
,
v_aeIndex
);
// Test Body
//Force usage of Hybrid Hierarchical addressing method
v_addressingMethod
:=
e_hybrid
;
v_primitiveScope
:=
p_primitiveScope
;
v_request
:=
valueof
(
m_delete
(
f_getResourceAddress
(
v_resourceIndex
,
v_addressingMethod
,
v_primitiveScope
),
f_getOriginator
(
v_resourceIndex
)));
mcaPort
.
send
(
f_getMsgOutPrimitive
(
m_request
(
v_request
)));
tc_ac
.
start
;
alt
{
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitive
(
int2002
)))
{
tc_ac
.
stop
;
setverdict
(
pass
,
__SCOPE__
&
": Container resource deleted using hierarchical addressing method"
);
}
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitiveOK
))
{
tc_ac
.
stop
;
setverdict
(
fail
,
__SCOPE__
&
": Wrong response status code in the response"
);
}
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitiveKO
))
{
tc_ac
.
stop
;
setverdict
(
fail
,
__SCOPE__
&
": Error while deleting container resource using hierarchical addressing method"
);
}
[]
tc_ac
.
timeout
{
setverdict
(
fail
,
__SCOPE__
&
": No answer while deleting resource"
);
}
}
// Postamble
f_cse_postamble_deleteResources
();
// Tear down
f_cf01Down
();
}
//end f_CSE_GEN_DEL_004
}
// end of group Delete
}
// end of group Generic
...
...
OneM2M_Testcases_CSE_Release_1.ttcn
View file @
03e1ee11
...
...
@@ -10705,6 +10705,7 @@ module OneM2M_Testcases_CSE_Release_1 {
var
integer
v_childResourceIndex
:=
-
1
;
const
ResourceType
c_containerResourceType
:=
int3
;
var
AttributeAux
v_invalidAttribute
;
var
FilterCriteria
v_invalidFilterCriteria
;
// Test control
...
...
@@ -10718,7 +10719,9 @@ module OneM2M_Testcases_CSE_Release_1 {
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_invalidFilterCriteria
:=
valueof
(
m_filterCriteria
);
v_invalidFilterCriteria
.
sizeBelow
:=
1
;
//Whatever value, it will be overwritten by forceFields parameter
v_request
:=
valueof
(
m_retrieveFilterCriteria
(
f_getResourceAddress
(
v_resourceIndex
),
f_getOriginator
(
v_resourceIndex
),
v_invalidFilterCriteria
));
v_invalidAttribute
:=
{
name
:=
"filterCriteria.sizeBelow"
,
value_
:=
"-1"
};
mcaPort
.
send
(
f_getMsgOutPrimitive
(
m_request
(
v_request
,
{
v_invalidAttribute
})));
tc_ac
.
start
;
...
...
OneM2M_Testcases_CSE_Release_2.ttcn
View file @
03e1ee11
...
...
@@ -86,7 +86,7 @@ module OneM2M_Testcases_CSE_Release_2 {
group
g_CSE_GEN_CRE_003
{
/**
* @desc Check that the IUT accepts the creation of a <container> resource using structured resource identifier
with hybrid addressing.
* @desc Check that the IUT accepts the creation of a <container>
resource using
shortcut
structured resource identifier
*
*/