Commit 8949f887 authored by YannGarcia's avatar YannGarcia
Browse files

Add RnisQuery_BV tests

parent 145a034c
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -27,6 +27,7 @@ https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purpo
https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2
https://forge.etsi.org/gitlab/mec/gs032p2-test-purposes/blob/master/Test%20Purposes/SRV/RNIS/RnisSpecificSubscription_BV.tplan2


- TC_MEC_SRV_RNIS_011_OK       <font color="color:green">To be tested</font>
- TC_MEC_SRV_RNIS_011_OK       <font color="color:green">To be tested</font>
- TC_MEC_SRV_RNIS_012_OK       <font color="color:green">To be tested</font>


### SAQ
### SAQ


+28 −3
Original line number Original line Diff line number Diff line
@@ -24,6 +24,10 @@ int json_codec::encode (const LibItsHttp__JsonMessageBodyTypes::JsonBody& msg, O
    const LocationAPI__TypesAndValues::UserTrackingSubscription& user_tracking_subscription = msg.userTrackingSubscription();
    const LocationAPI__TypesAndValues::UserTrackingSubscription& user_tracking_subscription = msg.userTrackingSubscription();
    user_tracking_subscription.encode(LocationAPI__TypesAndValues::UserTrackingSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON);
    user_tracking_subscription.encode(LocationAPI__TypesAndValues::UserTrackingSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON);
    data = char2oct(CHARSTRING("{\"userTrackingSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}"));
    data = char2oct(CHARSTRING("{\"userTrackingSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}"));
  } else if (msg.ischosen(LibItsHttp__JsonMessageBodyTypes::JsonBody::ALT_cellChangeSubscription)) {
    const RnisAPI__TypesAndValues::CellChangeSubscription& cell_change_subscription = msg.cellChangeSubscription();
    cell_change_subscription.encode(RnisAPI__TypesAndValues::CellChangeSubscription_descr_, encoding_buffer, TTCN_EncDec::CT_JSON);
    data = char2oct(CHARSTRING("{\"CellChangeSubscription\": ")) + OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()) + char2oct(CHARSTRING("}"));
  } else {
  } else {
    loggers::get_instance().error("json_codec::encode: Not supported");
    loggers::get_instance().error("json_codec::encode: Not supported");
  }
  }
@@ -94,6 +98,19 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy
    AppEnablementAPI__TypesAndValues::TrafficRule traffic_rule;
    AppEnablementAPI__TypesAndValues::TrafficRule traffic_rule;
    traffic_rule.decode(AppEnablementAPI__TypesAndValues::TrafficRule_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
    traffic_rule.decode(AppEnablementAPI__TypesAndValues::TrafficRule_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
    msg.trafficRule() = traffic_rule;
    msg.trafficRule() = traffic_rule;
  } else if (it->second.find("\"CellChangeSubscription\"") != std::string::npos) {
    RnisAPI__TypesAndValues::CellChangeSubscription cell_change_subscription;
    cell_change_subscription.decode(RnisAPI__TypesAndValues::CellChangeSubscription_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
    msg.cellChangeSubscription() = cell_change_subscription;
    //TODO Continue with other ChangeSubscription
  } else if (it->second.find("\"RabInfo\"") != std::string::npos) {
    RnisAPI__TypesAndValues::RabInfo rab_info;
    rab_info.decode(RnisAPI__TypesAndValues::RabInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
    msg.rabInfo() = rab_info;
  } else if (it->second.find("\"PlmnInfo\"") != std::string::npos) {
    RnisAPI__TypesAndValues::PlmnInfo plmn_info;
    plmn_info.decode(RnisAPI__TypesAndValues::PlmnInfo_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
    msg.plmnInfo() = plmn_info;
  } else if (it->second.find("\"bwInfo\"") != std::string::npos) {
  } else if (it->second.find("\"bwInfo\"") != std::string::npos) {
    BwManagementAPI__TypesAndValues::BwInfo bw_info;
    BwManagementAPI__TypesAndValues::BwInfo bw_info;


@@ -114,9 +131,17 @@ int json_codec::decode (const OCTETSTRING& p_data, LibItsHttp__JsonMessageBodyTy
    bw_info.decode(BwManagementAPI__TypesAndValues::BwInfo_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON);
    bw_info.decode(BwManagementAPI__TypesAndValues::BwInfo_descr_, decoding_buffer_, TTCN_EncDec::CT_JSON);
    msg.bwInfo() = bw_info;
    msg.bwInfo() = bw_info;
  } else if (it->second.find("\"problemDetails\"") != std::string::npos) { // TODO To be refined, problemDetails in different modules
  } else if (it->second.find("\"problemDetails\"") != std::string::npos) { // TODO To be refined, problemDetails in different modules
    UEidentityAPI__TypesAndValues::ProblemDetails problem_details;

    problem_details.decode(UEidentityAPI__TypesAndValues::ProblemDetails_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);

    msg.problemDetails__ue__identity() = problem_details;
//    UEidentityAPI__TypesAndValues::ProblemDetails problem_details;
//    problem_details.decode(UEidentityAPI__TypesAndValues::ProblemDetails_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
//    msg.problemDetails__ue__identity() = problem_details;

    RnisAPI__TypesAndValues::ProblemDetails problem_details;
    problem_details.decode(RnisAPI__TypesAndValues::ProblemDetails_descr_, decoding_buffer, TTCN_EncDec::CT_JSON);
    msg.problemDetails__rni() = problem_details;


  } else {
  } else {
    loggers::get_instance().warning("json_codec::decode: Unsupported variant");
    loggers::get_instance().warning("json_codec::decode: Unsupported variant");
    return -1;
    return -1;
+6 −1
Original line number Original line Diff line number Diff line
@@ -16,6 +16,7 @@ LibItsHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/json"
LibMec_Pics.PICS_MEC_PLAT               := true
LibMec_Pics.PICS_MEC_PLAT               := true
LibMec_Pics.PICS_SERVICES               := true
LibMec_Pics.PICS_SERVICES               := true
LibMec_Pics.PICS_RNIS                   := true
LibMec_Pics.PICS_RNIS                   := true
LibMec_Pics.PICS_RNIS_QUERY             := true
LibMec_Pics.PICS_RNIS_ALL_SUBSCRIPTIONS := true
LibMec_Pics.PICS_RNIS_ALL_SUBSCRIPTIONS := true


LocationAPI_Pics.PICS_LOCATION_API_SUPPORTED         := false
LocationAPI_Pics.PICS_LOCATION_API_SUPPORTED         := false
@@ -99,7 +100,11 @@ system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=192.1
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UEINFSUB_002_OK
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UEINFSUB_002_OK
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UEINFSUB_002_NF
#AtsMec_LocationAPI_TestCases.TC_MEC_SRV_UEINFSUB_002_NF


AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_011_OK
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_011_OK
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_012_OK
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_011_BR
#AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_012_BR
AtsMec_RnisAPI_TestCases.TC_MEC_SRV_RNIS_016_OK


#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_TRANS_001_OK
#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_TRANS_001_OK
#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_TRAF_001_OK
#AtsMec_AppEnablementAPI_TestCases.TC_MEC_SRV_TRAF_001_OK
+356 −6

File changed.

Preview size limit exceeded, changes collapsed.

+7 −0
Original line number Original line Diff line number Diff line
@@ -72,6 +72,13 @@ module AtsMec_TestControl {
    if (PICS_RNIS) {
    if (PICS_RNIS) {
      if (PICS_RNIS_ALL_SUBSCRIPTIONS) {
      if (PICS_RNIS_ALL_SUBSCRIPTIONS) {
        execute(TC_MEC_SRV_RNIS_011_OK());
        execute(TC_MEC_SRV_RNIS_011_OK());
        execute(TC_MEC_SRV_RNIS_012_OK());
        execute(TC_MEC_SRV_RNIS_011_BR());
        execute(TC_MEC_SRV_RNIS_012_BR());
      }
      if (PICS_RNIS_QUERY) {
        execute(TC_MEC_SRV_RNIS_016_OK());
        
      }
      }
    }
    }


Loading