Commit f69de71a authored by Yann Garcia's avatar Yann Garcia
Browse files

Bug fixed in TP_MEC_MEC040_SRV_MEF_003_NF/BR

parent a6ace51e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -5,6 +5,9 @@
		},
		{
			"path": "../gs032p2-test-purposes"
		},
		{
			"path": "../eurecom"
		}
	],
	"settings": {
+59 −0
Original line number Diff line number Diff line
@@ -1349,6 +1349,65 @@ module AtsMec_FederationEnablementAPI_TestCases {
        f_cf_01_http_down();
    } // End of testcase TC_MEC_MEC040_SRV_MEF_003_NF

    /**
     * @desc Check that the IUT responds with an error when it receives a request with an inconsistant URI
     */
    testcase TC_MEC_MEC040_SRV_MEF_003_BR() runs on HttpComponent system HttpTestAdapter {
        // Local variables
        var Headers v_headers;
        var SystemInfoList v_system_info_list := { 
                                                    valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_1, PX_FED_SYSTEM_NAME_1, PX_FED_SYSTEM_ID_1)),
                                                    valueof(m_system_info(PX_FED_SYSTEM_PROVIDER_2, PX_FED_SYSTEM_NAME_2, PX_FED_SYSTEM_ID_2))
                                                  };
        
        // Test control
        if (not(PICS_MEC_PLAT) or not(PICS_SERVICES) or not(PICS_FED_API_SUPPORTED)) {
            log("*** " & testcasename() & ": PICS_MEC_PLAT and PICS_SERVICES and PICS_FED_API_SUPPORTED required for executing the TC ***");
            setverdict(inconc);
            stop;
        }
        
        // Test component configuration
        f_cf_01_http_up();
        
        // Test adapter configuration
        
        // Preamble
        f_create_system_info_list(v_system_info_list);
        f_init_default_headers_list(-, -, v_headers);
        httpPort.send(
                      m_http_request(
                                     m_http_request_get(
                                                        PICS_ROOT_API & PX_FED_API_SUB_WRONG & "/" & oct2char(unichar2oct(PX_FED_SYSTEM_ID_1, "UTF-8")), // Inconsistent URI
                                                        v_headers
                                                        )
                                     )
                      );
        f_selfOrClientSyncAndVerdict(c_prDone, e_success);
        
        // Test Body
        tc_ac.start;
        alt {
          [] httpPort.receive(
                              mw_http_response(
                                               mw_http_response_404_not_found
                              )) {
            tc_ac.stop;
            
            log("*** " & testcasename() & ": PASS: IUT successfully responds with the correct error code ***");
            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_delete_system_info_list(v_system_info_list);
        f_cf_01_http_down();
    } // End of testcase TC_MEC_MEC040_SRV_MEF_003_BR

  } // End of group subscription

  group patch {
+1 −0
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ module AtsMec_FederationEnablementAPI_TestControl {

        execute(TC_MEC_MEC040_SRV_MEF_003_OK());
        execute(TC_MEC_MEC040_SRV_MEF_003_NF());
        execute(TC_MEC_MEC040_SRV_MEF_003_BR());

        execute(TC_MEC_MEC040_SRV_MEF_004_OK_01());
        execute(TC_MEC_MEC040_SRV_MEF_004_OK_02());