Commit c4525fd0 authored by YannGarcia's avatar YannGarcia
Browse files

Review Validate UETAG

parent 0a214f26
Loading
Loading
Loading
Loading
+6 −4
Original line number Original line Diff line number Diff line
@@ -7,8 +7,8 @@ LibCommon_Time.PX_TAC := 30.0
LibCommon_Sync.PX_TSYNC_TIME_LIMIT := 30.0;
LibCommon_Sync.PX_TSYNC_TIME_LIMIT := 30.0;
LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0;
LibCommon_Sync.PX_TSHUT_DOWN_TIME_LIMIT := 30.0;


#LibItsHttp_Pics.PICS_HEADER_HOST := "172.28.4.87"
LibItsHttp_Pics.PICS_HEADER_HOST := "172.28.4.87"
LibItsHttp_Pics.PICS_HEADER_HOST := "192.168.0.17"
#LibItsHttp_Pics.PICS_HEADER_HOST := "192.168.0.17"


LibItsHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json"
LibItsHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json"


@@ -38,7 +38,7 @@ LogEventTypes:= Yes


[TESTPORT_PARAMETERS]
[TESTPORT_PARAMETERS]
# In this section you can specify parameters that are passed to Test Ports.
# In this section you can specify parameters that are passed to Test Ports.
system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=192.168.0.17,port=8081,use_ssl=0)"
system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=172.28.4.87,port=8081,use_ssl=0)"


[DEFINE]
[DEFINE]
# In this section you can create macro definitions,
# In this section you can create macro definitions,
@@ -67,8 +67,10 @@ system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=192.1
#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UETAG_001_OK
#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UETAG_001_OK
#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UETAG_001_BR
#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UETAG_001_BR
#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UETAG_001_NF
#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UETAG_001_NF
AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UETAG_002_OK
#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UETAG_002_OK
#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UETAG_002_BR
#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UETAG_002_BR
AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UETAG_002_PF

#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UELOC_001_OK
#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UELOC_001_OK
#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UELOC_001_BR
#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UELOC_001_BR
#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UELOC_001_NF
#AtsMec_UEidentityAPI_TestCases.TC_MEC_SRV_UELOC_001_NF
+1 −0
Original line number Original line Diff line number Diff line
@@ -28,6 +28,7 @@ module AtsMec_TestControl {
        execute(TC_MEC_SRV_UETAG_001_NF());
        execute(TC_MEC_SRV_UETAG_001_NF());
        execute(TC_MEC_SRV_UETAG_002_OK());
        execute(TC_MEC_SRV_UETAG_002_OK());
        execute(TC_MEC_SRV_UETAG_002_BR());
        execute(TC_MEC_SRV_UETAG_002_BR());
        execute(TC_MEC_SRV_UETAG_002_PF());
      }
      }
      if (PICS_LOCATION_API_SUPPORTED) {
      if (PICS_LOCATION_API_SUPPORTED) {
        execute(TC_MEC_SRV_UELOC_001_OK());
        execute(TC_MEC_SRV_UELOC_001_OK());
+6 −11
Original line number Original line Diff line number Diff line
@@ -310,7 +310,7 @@ module AtsMec_UEidentityAPI_TestCases {
      // Preamble
      // Preamble
      f_init_default_headers_list(-, -, v_headers);
      f_init_default_headers_list(-, -, v_headers);
      // Verify that the user is not register yet
      // Verify that the user is not register yet
      if (f_check_user_register_state(-, v_headers) != -1) {
      if (f_check_user_register_state(-, v_headers) == -1) {
        log("*** " & testcasename() & ": INCONC: Wrong initial conditions ***");
        log("*** " & testcasename() & ": INCONC: Wrong initial conditions ***");
        f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
        f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
      }
      }
@@ -341,12 +341,12 @@ module AtsMec_UEidentityAPI_TestCases {
      alt {
      alt {
        [] httpPort.receive(
        [] httpPort.receive(
                            mw_http_response(
                            mw_http_response(
                                             mw_http_response_400_bad_request(
                                             mw_http_response_400_bad_request/*(
                                                                              mw_http_message_body_json(
                                                                              mw_http_message_body_json(
                                                                                                        mw_body_json_ue_identity_problem_details(
                                                                                                        mw_body_json_ue_identity_problem_details(
                                                                                                                                                 mw_problem_details(
                                                                                                                                                 mw_problem_details(
                                                                                                                                                                    -, -, 400
                                                                                                                                                                    -, -, 400
                                                                                                                                                                    )))))) {
                                                                                                                                                                    ))))*/)) {
          tc_ac.stop;
          tc_ac.stop;
          
          
          log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 403 Forbidden ***");
          log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 403 Forbidden ***");
@@ -366,7 +366,7 @@ module AtsMec_UEidentityAPI_TestCases {
     * @desc Check that the IUT responds with ProblemDetails on information an invalid URI
     * @desc Check that the IUT responds with ProblemDetails on information an invalid URI
     * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UeIdentity/PlatUeIdentity.tplan2
     * @see https://forge.etsi.org/gitlab/mec/MEC-tests/blob/master/Test%20Purposes/SRV/UeIdentity/PlatUeIdentity.tplan2
     */
     */
    testcase TC_MEC_SRV_UETAG_002_PF() runs on HttpComponent system HttpTestAdapter {
    testcase TC_MEC_SRV_UETAG_002_PF() runs on HttpComponent system HttpTestAdapter { // FIXME Which IE protocol should be invalid?
      // Local variables
      // Local variables
      var HeaderLines v_headers;
      var HeaderLines v_headers;
        
        
@@ -384,11 +384,6 @@ module AtsMec_UEidentityAPI_TestCases {
        
        
      // Preamble
      // Preamble
      f_init_default_headers_list(-, -, v_headers);
      f_init_default_headers_list(-, -, v_headers);
      // Verify that the user is not register yet
      if (f_check_user_register_state(-, v_headers) == -1) {
        log("*** " & testcasename() & ": INCONC: Wrong initial conditions ***");
        f_selfOrClientSyncAndVerdict(c_prDone, e_timeout);
      }
      httpPort.send(
      httpPort.send(
                    m_http_request(
                    m_http_request(
                                   m_http_request_post(
                                   m_http_request_post(
@@ -399,7 +394,7 @@ module AtsMec_UEidentityAPI_TestCases {
                                                                                                                 m_ue_identity_tag_info(
                                                                                                                 m_ue_identity_tag_info(
                                                                                                                                        {
                                                                                                                                        {
                                                                                                                                          m_ue_identity_tag_item(
                                                                                                                                          m_ue_identity_tag_item(
                                                                                                                                                                 PX_UE_IDENTITY_TAG,
                                                                                                                                                                 PX_UE_IDENTITY_TAG_INVALID_STATE,
                                                                                                                                                                 UNREGISTERED
                                                                                                                                                                 UNREGISTERED
                                                                                                                                                                 )
                                                                                                                                                                 )
                                                                                                                                          }
                                                                                                                                          }
@@ -424,7 +419,7 @@ module AtsMec_UEidentityAPI_TestCases {
                                                                                                                                                                            )))))) {
                                                                                                                                                                            )))))) {
          tc_ac.stop;
          tc_ac.stop;
          
          
          log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 404 Not Found ***");
          log("*** " & testcasename() & ": PASS: IUT successfully responds with a ProblemDetails set to 412 Precondition Failed ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
          f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
        }
        }
        [] tc_ac.timeout {
        [] tc_ac.timeout {
+2 −0
Original line number Original line Diff line number Diff line
@@ -12,6 +12,8 @@ module UEidentityAPI_Pixits {
  
  
  modulepar universal charstring PX_UE_IDENTITY_TAG := "UeTagA";
  modulepar universal charstring PX_UE_IDENTITY_TAG := "UeTagA";
  
  
  modulepar universal charstring PX_UE_IDENTITY_TAG_INVALID_STATE := "UeTagC";
  
  modulepar universal charstring PX_UE_IDENTITY_TAG_UNKNOWN := "UeTagW";
  modulepar universal charstring PX_UE_IDENTITY_TAG_UNKNOWN := "UeTagW";
  
  
} // End of module UEidentityAPI_Pixits 
} // End of module UEidentityAPI_Pixits 
+1 −0
Original line number Original line Diff line number Diff line
@@ -124,6 +124,7 @@ module LibMec_Functions {
        }
        }
      } // End of 'alt' statement
      } // End of 'alt' statement
      
      
      //log("<<< f_check_user_register_state: v_result: ", v_result);
      return v_result;
      return v_result;
    } // End of function f_check_user_register_state
    } // End of function f_check_user_register_state