Commit e6568b9a authored by Filipe Ferreira's avatar Filipe Ferreira
Browse files

MEC 013.

parent ebb36dd9
Loading
Loading
Loading
Loading
+64 −1
Original line number Diff line number Diff line
@@ -2898,5 +2898,68 @@ module AtsMec_AppEnablementAPI_TestCases {



   /*
    * Transport (TRANS)
    */
  group transportRules {
    
    /**
     * @desc Check that the IUT responds with a list of available transportswhen queried by a MEC Application
     * @see https://forge.etsi.org/rep/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/TRANS/PlatTransport.tplan2
     */
    testcase TP_MEC_SRV_TRANS_001_OK() runs on HttpComponent system HttpTestAdapter {
      // Local variables
      var HeaderLines v_headers;
        
      // Test control
      if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_APP_ENABLEMENT_API_SUPPORTED)) {
        log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_APP_ENABLEMENT_API_SUPPORTED required for executing the TC ***");
        setverdict(inconc);
        stop;
      }
        
      // Test component configuration
      f_cf_01_http_up();
        
      // Test adapter configuration

      // Preamble
      f_init_default_headers_list(-, -, v_headers);
      httpPort.send(
                    m_http_request(
                                   m_http_request_get( 
                                                      PX_ME_TRANSPORTS_MNGMT_URI,
                                                      v_headers
                                                      )
                                   )
                    );
      f_selfOrClientSyncAndVerdict(c_prDone, e_success);
      
      // Test Body
      tc_ac.start;
      alt {
        [] httpPort.receive(
                            mw_http_response(
                                             mw_http_response_ok(
                                                                 mw_body_json_transport_info_list(
                                                                                                mw_transport_info_list(*) // TODO don't care about the content
                                                                                                                  )))))) {
          tc_ac.stop;
          
          log("*** " & testcasename() & ": PASS: IUT successfully responds with a TransportInfoList ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
        }
        [] tc_ac.timeout {
          log("*** " & testcasename() & ": INCONC: Expected message not received ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
        }
      } // End of 'alt' statement
        
      // Postamble
      f_cf_01_http_down();
    } // End of testcase TP_MEC_SRV_TRANS_001_OK
  } // End of group transportRules 

}

} // End of module AtsMec_TestCases 
} // End of module AtsMec_AppEnablementAPI_TestCases 
+1894 −7

File changed.

Preview size limit exceeded, changes collapsed.