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
0d0e97a1
Commit
0d0e97a1
authored
Aug 29, 2019
by
Miguel Angel Reina Ortega
Browse files
Review of TC_CSE_GMG_005
Signed-off-by:
reinaortega
<
miguelangel.reinaortega@etsi.org
>
parent
6f05c1ca
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
24 deletions
+36
-24
OneM2M_PermutationFunctions.ttcn
OneM2M_PermutationFunctions.ttcn
+30
-18
OneM2M_Testcases_CSE_Release_1.ttcn
OneM2M_Testcases_CSE_Release_1.ttcn
+6
-6
No files found.
OneM2M_PermutationFunctions.ttcn
View file @
0d0e97a1
...
...
@@ -7353,33 +7353,45 @@ module OneM2M_PermutationFunctions {
//Local constants
const
integer
c_numberOfResponsePrimitive
:=
2
;
// Local variables
var
MsgIn
v_response
;
var
integer
v_aeIndex
:=
-
1
;
var
integer
v_containerIndex_1
:=
-
1
;
var
integer
v_containerIndex_2
:=
-
1
;
//Local variables
var
integer
v_acpIndex
,
v_aeIndex_1
,
v_aeIndex_2
:=
-
1
;
var
integer
v_groupIndex
:=
-
1
;
var
ListOfURIs
v_memberIDs
;
var
AcpType
v_acpIds
;
var
integer
i
;
var
template
RequestPrimitive
v_createContainerRequest_1
:=
m_createContainer_noResourceName
;
var
template
RequestPrimitive
v_createContainerRequest_2
:=
m_createContainer_noResourceName
;
var
template
RequestPrimitive
v_createAcp
:=
m_createAcp
(
"NotInitialized"
,
"PermissionForEveryone"
,
-
,
-
);
// Test control
if
(
not
(
PICS_ACP_SUPPORT
))
{
setverdict
(
inconc
,
__SCOPE__
&
": AccessControlPolicy support is required to run this test case"
);
stop
;
}
// Test component configuration
f_cf01Up
();
f_cf01Up
(
true
);
// Test adapter configuration
// Preamble
v_aeIndex
:=
f_cse_preamble_registerAe
(
-
,
-
);
//c_CRUDNDi
v_containerIndex_1
:=
f_cse_createResource
(
int3
,
v_createContainerRequest_1
,
v_aeIndex
);
// AE child resource
v_containerIndex_2
:=
f_cse_createResource
(
int3
,
v_createContainerRequest_2
,
v_aeIndex
);
// AE child resource
v_memberIDs
:=
{
f_getResourceId
(
vc_resourcesList
[
v_containerIndex_1
].
resource
),
f_getResourceId
(
vc_resourcesList
[
v_containerIndex_2
].
resource
)};
v_groupIndex
:=
f_cse_createResource
(
int9
,
m_createGroup
(
2
,
v_memberIDs
,
omit
,
int3
,
-
,
-
),
v_aeIndex
);
// AE child resource
v_acpIndex
:=
f_cse_createResource
(
int1
,
v_createAcp
,
-
);
// AE child resource
v_acpIds
:=
{
f_getResourceId
(
vc_resourcesList
[
v_acpIndex
].
resource
)};
v_aeIndex_1
:=
f_cse_preamble_registerAe
(
v_acpIds
,
-
);
//c_CRUDNDi
//vc_ae2.start(f_cse_createAccessControlPolicyAux("PermissionForAE1",{"all"}, int63));
//f_aeSimu_checkComponentDoneAndGetVerdict(vc_ae2);
vc_ae2
.
start
(
f_cse_createResource
(
int2
,
m_createAe
(
PX_TS_AE2
.
appId
,
v_acpIds
,
PX_TS_AE2
.
aeIdStem
,
c_defaultAE2Name
,
omit
),
-
1
));
// AE2 is registred
f_aeSimu_checkComponentDoneAndGetVerdict
(
vc_ae2
);
v_aeIndex_2
:=
f_getLatestResource
(
vc_ae2
);
v_memberIDs
:=
{
f_getResourceId
(
vc_resourcesList
[
v_aeIndex_1
].
resource
),
f_getResourceId
(
vc_resourcesList
[
v_aeIndex_2
].
resource
)};
v_groupIndex
:=
f_cse_createResource
(
int9
,
m_createGroup
(
2
,
v_memberIDs
,
omit
,
int2
,
-
,
v_acpIds
),
v_aeIndex_1
);
// AE child resource
p_requestPrimitive
.
to_
:=
f_getResourceAddress
(
v_groupIndex
)
&
"/fopt"
;
p_requestPrimitive
.
from_
:=
f_getOriginator
(
v_
ae
Index
);
p_requestPrimitive
.
from_
:=
f_getOriginator
(
v_
group
Index
);
p_requestPrimitive
.
requestIdentifier
:=
valueof
(
p_requestPrimitive
.
requestIdentifier
)
&
f_rnd
(
1
,
1000000
);
// Test Body
...
...
@@ -7387,20 +7399,20 @@ module OneM2M_PermutationFunctions {
f_send
(
e_mca_port
,
m_request
(
valueof
(
p_requestPrimitive
)));
tc_ac
.
start
;
alt
{
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitive
(
int2000
)))
->
value
v_response
{
[]
mcaPort
.
receive
(
mw_response
(
mw_responsePrimitive
(
int2000
)))
->
value
v
c
_response
{
tc_ac
.
stop
;
setverdict
(
pass
,
__SCOPE__
&
": Operation performed successfully by using fanOutPoint in group resource"
);
if
(
not
ispresent
(
v_response
.
primitive
.
responsePrimitive
.
primitiveContent
.
aggregatedResponse
.
responsePrimitive_list
)){
if
(
not
ispresent
(
v
c
_response
.
primitive
.
responsePrimitive
.
primitiveContent
.
aggregatedResponse
.
responsePrimitive_list
)){
setverdict
(
fail
,
__SCOPE__
&
": Error, aggregatedResponse element not provided"
);
}
else
{
if
(
lengthof
(
v_response
.
primitive
.
responsePrimitive
.
primitiveContent
.
aggregatedResponse
.
responsePrimitive_list
)
!=
c_numberOfResponsePrimitive
){
if
(
lengthof
(
v
c
_response
.
primitive
.
responsePrimitive
.
primitiveContent
.
aggregatedResponse
.
responsePrimitive_list
)
!=
c_numberOfResponsePrimitive
){
setverdict
(
fail
,
__SCOPE__
&
": Error, length of aggregatedResponse is not valid"
);
}
else
{
for
(
i
:=
0
;
i
<
c_numberOfResponsePrimitive
;
i
:=
i
+
1
){
if
(
not
match
(
v_response
.
primitive
.
responsePrimitive
.
primitiveContent
.
aggregatedResponse
.
responsePrimitive_list
[
i
].
primitiveContent
,
p_contentResponse
)){
if
(
not
match
(
v
c
_response
.
primitive
.
responsePrimitive
.
primitiveContent
.
aggregatedResponse
.
responsePrimitive_list
[
i
].
primitiveContent
,
p_contentResponse
)){
setverdict
(
fail
,
__SCOPE__
&
": Error, aggregatedResponse doesn't match with template expected"
);
}
}
...
...
OneM2M_Testcases_CSE_Release_1.ttcn
View file @
0d0e97a1
...
...
@@ -12195,12 +12195,12 @@ module OneM2M_Testcases_CSE_Release_1 {
testcase
TC_CSE_GMG_005_UPD
()
runs
on
Tester
system
CseSystem
{
//Update
var
AeSimu
v_ae1
:=
AeSimu
.
create
(
"AE1"
)
alive
;
var
template
RequestPrimitive
v_updateRequest
:=
m_update
Container
Base
;
var
template
RequestPrimitive
v_updateRequest
:=
m_update
Ae
Base
;
var
template
PrimitiveContent
v_contentResponse
;
var
Labels
v_labels_1
:=
{
"VALUE_1"
};
v_contentResponse
.
container
:=
mw_content
Container
Base
;
v_contentResponse
.
container
.
labels
:=
?
;
v_updateRequest
.
primitiveContent
.
container
.
labels
:=
v_labels_1
;
v_contentResponse
.
aE
:=
mw_content
Ae
Base
;
v_contentResponse
.
aE
.
labels
:=
?
;
v_updateRequest
.
primitiveContent
.
aE
.
labels
:=
v_labels_1
;
v_ae1
.
start
(
f_CSE_GMG_005
(
v_updateRequest
,
v_contentResponse
));
v_ae1
.
done
;
...
...
@@ -12210,7 +12210,7 @@ module OneM2M_Testcases_CSE_Release_1 {
var
AeSimu
v_ae1
:=
AeSimu
.
create
(
"AE1"
)
alive
;
var
template
PrimitiveContent
v_contentResponse
;
v_contentResponse
.
container
:=
mw_content
Container
Base
;
v_contentResponse
.
aE
:=
mw_content
Ae
Base
;
v_ae1
.
start
(
f_CSE_GMG_005
(
m_retrieve
(
"Temporary"
,
"Temporary"
),
v_contentResponse
));
v_ae1
.
done
;
...
...
@@ -12219,7 +12219,7 @@ module OneM2M_Testcases_CSE_Release_1 {
testcase
TC_CSE_GMG_005_DEL
()
runs
on
Tester
system
CseSystem
{
//Delete
var
AeSimu
v_ae1
:=
AeSimu
.
create
(
"AE1"
)
alive
;
var
template
PrimitiveContent
v_contentResponse
;
v_contentResponse
.
container
:=
mw_content
Container
Base
;
// TODO see with wath should it be matched
v_contentResponse
.
aE
:=
mw_content
Ae
Base
;
// TODO see with wath should it be matched
v_ae1
.
start
(
f_CSE_GMG_005
(
m_delete
(
"Temporary"
,
"Temporary"
),
v_contentResponse
));
v_ae1
.
done
;
}
//end TC_CSE_GMG_005_DEL
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment