Commit 8315f79a authored by Yann Garcia's avatar Yann Garcia
Browse files

Bug fixed validating TC_MEC_MEC028_SRV_WAI_011_OK

parent d81c0d49
Loading
Loading
Loading
Loading
+10 −5
Original line number Diff line number Diff line
@@ -77,11 +77,21 @@ int json_codec_mec028::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBo
      assoc_sta_subscription.decode(WlanInformationAPI__TypesAndValues::AssocStaSubscription_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON);
      msg.assocStaSubscription() = assoc_sta_subscription;
    }
  } else if (it->second.find("\"AssocStaNotification\"") != std::string::npos) {
    WlanInformationAPI__TypesAndValues::AssocStaNotification assoc_sta_notification;
    TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str()));
    assoc_sta_notification.decode(WlanInformationAPI__TypesAndValues::AssocStaNotification_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON);
    msg.assocStaNotification() = assoc_sta_notification;
  } else if (it->second.find("\"StaDataRateSubscription\"") != std::string::npos) {
    WlanInformationAPI__TypesAndValues::StaDataRateSubscription sta_data_rate_subscription;
    TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str()));
    sta_data_rate_subscription.decode(WlanInformationAPI__TypesAndValues::StaDataRateSubscription_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON);
    msg.staDataRateSubscription() = sta_data_rate_subscription;
  // } else if (it->second.find("\"StaDataRateNotification\"") != std::string::npos) {
  //   WlanInformationAPI__TypesAndValues::StaDataRateNotification assoc_sta_data_rate_notification;
  //   TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str()));
  //   assoc_sta_data_rate_notification.decode(WlanInformationAPI__TypesAndValues::StaDataRateNotification_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON);
  //   msg.assocStaDataRateNotification() = assoc_sta_data_rate_notification;
  } else if ((it->second.find("\"_links\"") != std::string::npos) && (it->second.find("subscriptions") != std::string::npos)) { // SubscriptionLinkList
    // decode_str: {"_links":{"self":{"href":"https://try-mec.etsi.org/sbxpb4c4k2/wai/v2/subscriptions"}}}
    WlanInformationAPI__TypesAndValues::SubscriptionLinkList subscription_link_list;
@@ -98,11 +108,6 @@ int json_codec_mec028::decode (const OCTETSTRING& p_data, LibHttp__JsonMessageBo
    TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str()));
    sta_info_list.decode(WlanInformationAPI__TypesAndValues::StaInfoList_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON);
    msg.staInfoList() = sta_info_list;
  } else if (it->second.find("\"AssocStaNotification\"") != std::string::npos) {
    WlanInformationAPI__TypesAndValues::AssocStaNotification assoc_sta_notification;
    TTCN_Buffer decoding_buffer_(OCTETSTRING(str.length(), (const unsigned char*)str.c_str()));
    assoc_sta_notification.decode(WlanInformationAPI__TypesAndValues::AssocStaNotification_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON);
    msg.assocStaNotification() = assoc_sta_notification;
  } else {
    return json_codec::decode(p_data, msg, p_params);
  }
+3 −3
Original line number Diff line number Diff line
@@ -18,9 +18,9 @@ LibMec_Pics.PICS_ROOT_API := "/sbxykqjr17/mep1/" # Need to sign i

LibMec_Pics.PICS_MEC_PLAT := true


WlanInformationAPI_Pixits.PX_WLAN_FILTER_VALUE := "005C0A0A0002"
WlanInformationAPI_Pixits.PX_MAC_ID            := "005C07070707"
WlanInformationAPI_Pixits.PX_ASSOC_STA_SUBSCRIPTION_CALLBACK := "http://yanngarcia.ddns.net/wais/v2/assoc_sta"

[LOGGING]
# In this section you can specify the name of the log file and the classes of events
@@ -81,7 +81,7 @@ system.httpPort_notif.params := "HTTP(codecs=json:json_codec_mec028)/TCP(debug=1
# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_004_BR
# Check that the IUT responds with the requested list of subscription
AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_005_OK
#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_005_OK
# Check that the IUT responds with the requested list of subscription when the MEC Platform is queried using a filter on subscription type
#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_006_OK
# Check that the IUT responds with an error when a request with incorrect parameters is sent by a MEC Application
@@ -109,7 +109,7 @@ AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_005_OK
# Check that the IUT responds with an error when an not existing subscription cannot be deleted
#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_010_NF
# Check that the IUT sends a notification about WLAN event notification if the MEC service has an associated subscription and the event is generated
#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_011_OK
AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_011_OK
# Check that the IUT responds with the list of WLAN Access Point
#AtsMec_WlanInformationAPI_TestCases.TC_MEC_MEC028_SRV_WAI_012_OK
# Check that the IUT responds with a new measurement configuration
+27 −29
Original line number Diff line number Diff line
@@ -468,7 +468,7 @@ module AtsMec_WlanInformationAPI_TestCases {
      httpPort.send(
                    m_http_request(
                                   m_http_request_get(
                                                      PICS_ROOT_API & PX_ME_WLAN_URI_SUB & "subscription_type=assoc_sta",
                                                      PICS_ROOT_API & PX_ME_WLAN_URI_SUB & "?" & "subscription_type=assoc_sta",
                                                      v_headers
                    )));
      f_selfOrClientSyncAndVerdict(c_prDone, e_success);
@@ -535,7 +535,7 @@ module AtsMec_WlanInformationAPI_TestCases {
      httpPort.send(
                    m_http_request(
                                    m_http_request_get(
                                                      PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions/assoc_sta",
                                                      PICS_ROOT_API & PX_ME_WLAN_URI & "/subscriptions?assoc_sta",
                                                      v_headers
                    )));
      f_selfOrClientSyncAndVerdict(c_prDone, e_success);
@@ -1164,7 +1164,7 @@ module AtsMec_WlanInformationAPI_TestCases {
      httpPort.send(
                    m_http_request(
                                   m_http_request_delete(
                                                          PICS_ROOT_API & PX_ME_WLAN_URI_SUB & v_subscription_id,
                                                         PICS_ROOT_API & PX_ME_WLAN_URI_SUB & "/" & v_subscription_id,
                                                         v_headers
                    )));
      f_selfOrClientSyncAndVerdict(c_prDone, e_success);
@@ -1276,13 +1276,11 @@ module AtsMec_WlanInformationAPI_TestCases {
                                                                       -,
                                                                       -,
                                                                       mw_http_message_body_json(
                                                                                                  mw_body_json_assoc_sta_subscription(
                                                                                                                                      mw_assoc_sta_subscription(
                                                                                                                                                                PX_ASSOC_STA_SUBSCRIPTION_CALLBACK,
                                                                                                                                                                -,
                                                                                                                                                                -, -,
                                                                                                                                                                ?
                                  )))))) {
                                                                                                 mw_body_json_assoc_sta_notification(
                                                                                                                                     mw_assoc_sta_notification(
                                                                                                                                                               mw_ap_identity(
                                                                                                                                                                              PX_MAC_ID
                                  ))))))) {
          tc_wait.stop;
          
          f_init_default_headers_list(-, -, v_headers);
+42 −0
Original line number Diff line number Diff line
@@ -231,6 +231,48 @@ module WlanInformationAPI_Templates {
    expiryDeadline          := p_expiryDeadline
  } // End of template mw_sta_data_rate_subscription



  template (omit) AssocStaNotification m_assoc_sta_notification(
                                                                in template (value) ApIdentity p_apId,
                                                                in template (omit) TimeStamp p_timeStamp := omit,
                                                                in template (omit) StaIdentityList p_staId := omit
                                                                ) := {
    notificationType := "AssocStaNotification",
    timeStamp        := p_timeStamp,
    apId             := p_apId,
    staId            := p_staId
  } // End of template m_assoc_sta_notification

  template (present) AssocStaNotification mw_assoc_sta_notification(
                                                                    template (present) ApIdentity p_apId := ?,
                                                                    template TimeStamp p_timeStamp := *,
                                                                    template StaIdentityList p_staId := *
                                                                    ) := {
    notificationType := "AssocStaNotification",
    timeStamp        := p_timeStamp,
    apId             := p_apId,
    staId            := p_staId
  } // End of template mw_assoc_sta_notification

  template (omit) StaDataRateNotification m_sta_data_rate_notification(
                                                                       in template (omit) TimeStamp p_timeStamp := omit,
                                                                       in template (omit) StaDataRateList p_staDataRate := omit
                                                                       ) := {
    notificationType := "AssocStaDatarateNotification",
    timeStamp        := p_timeStamp,
    staDataRate      := p_staDataRate
  } // End of template m_sta_data_rate_notification

  template (present) StaDataRateNotification mw_sta_data_rate_notification(
                                                                           template TimeStamp p_timeStamp := *,
                                                                           template StaDataRateList p_staDataRate := *
                                                                           ) := {
    notificationType := "AssocStaDatarateNotification",
    timeStamp        := p_timeStamp,
    staDataRate      := p_staDataRate
  } // End of template mw_sta_data_rate_notification

  template (omit) StaIdentity m_sta_identity(
                                             in Json.String p_macId,
                                             in template (omit) SsidList p_ssid := omit,
+12 −0
Original line number Diff line number Diff line
@@ -1268,6 +1268,18 @@ module LibHttp_JsonTemplates {
      staDataRateSubscription := p_staDataRateSubscription
    } // End of template m_body_json_sta_data_rate_subscription

    template (value) JsonBody m_body_json_assoc_sta_notification(
                                                                 in template (value) AssocStaNotification p_assocStaNotification
                                                                 ) := {
      assocStaNotification := p_assocStaNotification
    } // End of template m_body_json_assoc_sta_notification

    template (present) JsonBody mw_body_json_assoc_sta_notification(
                                                                    template (present) AssocStaNotification p_assocStaNotification := ?
                                                                    ) := {
      assocStaNotification := p_assocStaNotification
    } // End of template mw_body_json_assoc_sta_notification

    template (present) JsonBody mw_body_json_sta_data_rate_subscription(
                                                                        template (present) StaDataRateSubscription p_staDataRateSubscription := ?
                                                                        ) := {