Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
ATS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TST
ATS
Commits
b6701f04
Commit
b6701f04
authored
7 years ago
by
Miguel Angel Reina Ortega
Browse files
Options
Downloads
Patches
Plain Diff
TC_CSE_GMG_UPD_010 - Some corrections (not finalised yet)
parent
12f6e199
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
OneM2M_Testcases.ttcn
+29
-36
29 additions, 36 deletions
OneM2M_Testcases.ttcn
with
29 additions
and
36 deletions
OneM2M_Testcases.ttcn
+
29
−
36
View file @
b6701f04
...
@@ -15214,26 +15214,26 @@ module OneM2M_Testcases {
...
@@ -15214,26 +15214,26 @@ module OneM2M_Testcases {
{
{
//Local constants
//Local constants
const ResourceType c_ResourceTypeGroup := int9;
const ResourceType c_ResourceTypeGroup := int9;
const ResourceType c_ResourceType1 := int4;
const integer c_maxNrOfMembers := 2;
const MemberType c_memberType1 := int4; // should be set same type as c_ResourceType1
const XSD.String c_primitiveContent := "primitive_contet";
const ConsistencyStrategy c_consistentcyStrategy := int1; // ABANDOND_MEMBER
// const XSD.AnyURI c_targetResourceAddress := "TARGET_RESOURCE_ADDRESS";
const XSD.AnyURI c_memberResourceAddress1 := "MEMBER_RESSOURCE_ADDRESS_1";
const XSD.AnyURI c_memberResourceAddress2 := "MEMBER_RESSOURCE_ADDRESS_2";
// Local variables
// Local variables
var MsgIn v_response;
var MsgIn v_response;
var RequestPrimitive v_request;
var RequestPrimitive v_request;
var integer v_aeIndex := -1;
var integer v_aeIndex := -1;
var integer v_remoteCSEIndex := -1;
var integer v_remoteCSEIndex := -1;
var integer v_groupIndex := -1;
var integer v_groupIndex := -1;
var integer v_contentInstanceIndex := -1;
var integer v_containerIndex_1 := -1;
var integer v_containerIndex_2 := -1;
var integer v_subscriptionIndex := -1;
var template RequestPrimitive v_createRequest := m_createGroupBase;
var template RequestPrimitive v_createRequest := m_createGroupBase;
var template RequestPrimitive v_updateRequest := m_updateGroupBase;
var template RequestPrimitive v_updateRequest := m_updateGroupBase;
var template RequestPrimitive v_createMember;
var XSD.AnyURI v_memberId_1;
var XSD.AnyURI v_memberId_2;
var CseTester v_notifyHandler;
// Test control
// Test control
// Test component configuration
// Test component configuration
...
@@ -15243,27 +15243,21 @@ module OneM2M_Testcases {
...
@@ -15243,27 +15243,21 @@ module OneM2M_Testcases {
// Preamble
// Preamble
v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
v_aeIndex := f_cse_preamble_registerAe(); //c_CRUDNDi
// TODO: -> register IUT to the remoteCSE
//TODO: -> register IUT to the remoteCSE
//v_remoteCSEIndex := ...
v_containerIndex_1 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource
v_containerIndex_2 := f_cse_createResource(int3, m_createContainer_noResourceName, v_aeIndex); // AE child resource
v_createRequest := f_getCreateRequestPrimitive(c_ResourceTypeGroup, v_createRequest, v_aeIndex);
v_createRequest.primitiveContent.group_ := m_contentCreateGroup(2, {c_memberResourceAddress1, c_memberResourceAddress2}, omit);
v_memberId_1 := f_getResourceId(vc_resourcesList[v_containerIndex_1].resource);
v_createRequest.primitiveContent.group_.memberType := c_memberType1;
v_memberId_2 := f_getResourceId(vc_resourcesList[v_containerIndex_2].resource);
v_createRequest.primitiveContent.group_.memberTypeValidated := false;
v_createRequest.primitiveContent.group_.consistencyStrategy := c_consistentcyStrategy;
v_createRequest := valueof(m_createGroup(c_maxNrOfMembers, {v_memberId_1, v_memberId_2}, omit, int3));
v_groupIndex := f_cse_createResource(c_ResourceTypeGroup, v_createRequest, v_aeIndex);
v_groupIndex := f_cse_createResource(c_ResourceTypeGroup, v_createRequest, v_aeIndex);
// TODO: -> the AE having a subscription to c_targetResourceAddress
v_subscriptionIndex := f_cse_createResource(int23,m_createSubscriptionBase, v_groupIndex);
// TODO: -> do the resources actually need to be created?
// TODO: choose the right template for member resource
v_notifyHandler.start(f_cse_notifyProcedure_subscriptionVerificationHandler(v_aeIndex));
v_createMember := m_createContentInstance(f_getResourceAddress(v_aeIndex), c_primitiveContent & "_1");
v_contentInstanceIndex := f_cse_createResource(c_ResourceType1, v_createMember, v_aeIndex);
// TODO: create resource of type <group> at c_memberResourceAddress2 on remoteCSE
// TODO: set onlineStatus to false on remoteCSE
//Test Body
//Test Body
v_request := f_getUpdateRequestPrimitive(c_ResourceTypeGroup, v_groupIndex, v_updateRequest);
v_request := f_getUpdateRequestPrimitive(c_ResourceTypeGroup, v_groupIndex, v_updateRequest);
//v_request.from_ := CSE-ID
//v_request.from_ := CSE-ID
...
@@ -15275,9 +15269,8 @@ module OneM2M_Testcases {
...
@@ -15275,9 +15269,8 @@ module OneM2M_Testcases {
alt {
alt {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value v_response {
[] mcaPort.receive(mw_response(mw_responsePrimitive(int2004))) -> value v_response {
tc_ac.stop;
tc_ac.stop;
setverdict(pass, __SCOPE__ & ": update successful");
}
}
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
[] mcaPort.receive(mw_response(mw_responsePrimitiveKO)) {
tc_ac.stop;
tc_ac.stop;
setverdict(fail, __SCOPE__ & ": Error while retrieving resource");
setverdict(fail, __SCOPE__ & ": Error while retrieving resource");
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment