Commit 5de9457e3c4902372a10d48ffb42b06da08c68b2

Authored by Miguel Angel Reina Ortega
1 parent c5c3969b

TC_CSE_REG_CRE_031 implemented as per TDE-2019-0069R01

Signed-off-by: reinaortega <miguelangel.reinaortega@etsi.org>
... ... @@ -1007,7 +1007,6 @@ module OneM2M_Testcases_CSE_Release_1 {
1007 1007  
1008 1008 }
1009 1009  
1010   -
1011 1010 /**
1012 1011 * @desc Check that the IUT accepts an AE re-registration (allowed M2M-SP-assigned AE-ID, S-AE-ID-STEM provided by AE), transfer response to the AE
1013 1012 *
... ... @@ -2282,6 +2281,89 @@ module OneM2M_Testcases_CSE_Release_1 {
2282 2281 f_cf02Down();
2283 2282  
2284 2283 }; //end f_CSE_REG_CRE_030
  2284 +
  2285 + /**
  2286 + * @desc Check that the IUT accepts an AE registration (S-AE-ID-STEM not provided by AE), communication between MN-CSE and IN-CSE
  2287 + *
  2288 + */
  2289 + testcase TC_CSE_REG_CRE_031() runs on Tester system CseSystem {
  2290 +
  2291 + var CseSimu v_cse1 := CseSimu.create("CSE1") alive;
  2292 + v_cse1.start(f_setProtocolBinding(PX_PROTOCOL_BINDING_CSE1));
  2293 + v_cse1.done;
  2294 +
  2295 + v_cse1.start(f_CSE_REG_CRE_031());
  2296 +
  2297 + v_cse1.done;
  2298 +
  2299 + }
  2300 +
  2301 + function f_CSE_REG_CRE_031() runs on CseSimu {
  2302 +
  2303 + var MsgIn v_response;
  2304 + var RequestPrimitive v_request;
  2305 + var integer v_aeAnncIndex := -1;
  2306 + var template PrimitiveContent v_primitiveContent;
  2307 + const charstring v_cseId := PX_CSE_ID;
  2308 + template XSD.AnyURI v_link := pattern "{v_cseId}/S*";
  2309 + template XSD.ID v_resourceID := pattern "S*";
  2310 +
  2311 + //Test control
  2312 + if(not(PICS_IN_CSE)) {
  2313 + setverdict(inconc, __SCOPE__ & ": IUT shall be IN-CSE to run this test case");
  2314 + stop;
  2315 + }
  2316 +
  2317 + // Test component configuration
  2318 + f_cf04Up();
  2319 +
  2320 + //Preamble
  2321 +
  2322 + vc_remoteCseIndex := f_cse_registerRemoteCse(m_createRemoteCSEBase);
  2323 +
  2324 + //Test Body
  2325 + v_request := valueof(m_createAEAnnc(-, f_getResourceAddress(vc_remoteCseIndex), PX_CSE1_ID & "/" & "S", PX_APP_ID, PX_CSE1_ID & "/" & "S"));
  2326 +
  2327 + v_request := f_getCreateRequestPrimitive(int10002, v_request, vc_remoteCseIndex);
  2328 + v_primitiveContent.aEAnnc := mw_contentAeAnnc_base;
  2329 +
  2330 + mccPort.send(f_getMsgOutPrimitive(m_request(v_request)));
  2331 +
  2332 + tc_ac.start;
  2333 + alt {
  2334 + [] mccPort.receive(mw_response(mw_responsePrimitive(int2001, v_primitiveContent))) -> value v_response {
  2335 + tc_ac.stop;
  2336 + f_checkAttributesToBeSaved(int10002, v_request, v_response.primitive.responsePrimitive);
  2337 + v_aeAnncIndex := f_setResource(v_response.primitive.responsePrimitive.primitiveContent, int10002);
  2338 +
  2339 + setverdict(pass, __SCOPE__ & ": AEAnnc successfully created.");
  2340 + if(match(v_response.primitive.responsePrimitive.primitiveContent.aEAnnc.link, v_link)) {
  2341 + setverdict(fail, __SCOPE__ & ": Link attribute not correct");
  2342 + }
  2343 + if(v_response.primitive.responsePrimitive.primitiveContent.aEAnnc.labels != {"Credential-ID:None"}) {
  2344 + setverdict(fail, __SCOPE__ & ": Labels attribute not correct");
  2345 + }
  2346 + }
  2347 + [] mccPort.receive(mw_response(mw_responsePrimitive(int2001))) -> value v_response {
  2348 + tc_ac.stop;
  2349 + setverdict(fail, __SCOPE__ & ": AEAnnc successfully created with wrong attributes");
  2350 + }
  2351 + [] mccPort.receive(mw_response(mw_responsePrimitiveInverse(int2001))) -> value v_response {
  2352 + tc_ac.stop;
  2353 + setverdict(fail, __SCOPE__ & ": Error while creating AEAnnc with status code " & int2str(enum2int(v_response.primitive.responsePrimitive.responseStatusCode)));
  2354 + }
  2355 + [] tc_ac.timeout {
  2356 + setverdict(fail, __SCOPE__ & ": No answer while creating AEAnnc");
  2357 + }
  2358 + }
  2359 +
  2360 + // Postamble
  2361 + f_cse_postamble_deleteResourcesCSE();
  2362 +
  2363 + // Tear down
  2364 + f_cf04Down();
  2365 +
  2366 + } //end of testcase TC_CSE_REG_CRE_031
2285 2367  
2286 2368 } //end group Create
2287 2369  
... ...