Commit 71322d91 authored by Michael Proestler's avatar Michael Proestler
Browse files

Add TC_ESRP_FIND_SERVICE_BV_02

Refactoring and re-usage of functions, add redirect encoding, add mocks
parent 1820d056
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -44,6 +44,10 @@ int lost_codec::encode (const LibItsHttp__XmlMessageBodyTypes::XmlBody& msg, OCT
    const urn__ietf__params__xml__ns__lost1::ListServicesByLocationResponse& list_services_by_location_response = msg.listServicesByLocationResponse();
    loggers::get_instance().log_msg("lost_codec::encode: Process ListServicesByLocationResponse", (const Base_Type&)list_services_by_location_response);
    list_services_by_location_response.encode(urn__ietf__params__xml__ns__lost1::ListServicesByLocationResponse_descr_, encoding_buffer, TTCN_EncDec::CT_XER, XER_EXTENDED);
  } else if  (msg.ischosen(LibItsHttp__XmlMessageBodyTypes::XmlBody::ALT_redirect)) {
    const urn__ietf__params__xml__ns__lost1::Redirect& redirect = msg.redirect();
    loggers::get_instance().log_msg("lost_codec::encode: Process Redirect", (const Base_Type&)redirect);
    redirect.encode(urn__ietf__params__xml__ns__lost1::Redirect_descr_, encoding_buffer, TTCN_EncDec::CT_XER, XER_EXTENDED);
  } else {
    loggers::get_instance().warning("lost_codec::encode: Unsupported variant");
    return -1;
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ LogEventTypes:= Yes

# ECRF
Ecrf.httpPort.params := "HTTP(codecs=lost:lost_codec)/TCP(debug=1,server_mode=1,local_port=8080,use_ssl=0)"
ForestGuide.httpPort.params := "HTTP(codecs=lost:lost_codec)/TCP(debug=1,server_mode=1,local_port=8082,use_ssl=0)"
EcrfRedirectTarget.httpPort.params := "HTTP(codecs=lost:lost_codec)/TCP(debug=1,server_mode=1,local_port=8082,use_ssl=0)"

#system.httpPort.params := "HTTP(codecs=json:json_codec)/TCP(debug=1,server=host.docker.internal,port=8090,use_ssl=0)"
#system.SIPP.params := "SIP/TCP(debug=1,server_mode=1,local_port=5070,use_ssl=0)"
+35 −0
Original line number Diff line number Diff line
echo "Sending ECRF Request"
curl --location --request POST 'http://127.0.0.1:8080' \
--header 'Content-Type: application/lost+xml' \
--data-raw '<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<findService xmlns="urn:ietf:params:xml:ns:lost1" recursive='\''true'\''>
	<location id="6020688f1ce1896d" profile="geodetic-2d">
        <gs:Circle srsName="urn:ogc:def:crs:EPSG::4326" xmlns:gml="http://www.opengis.net/gml" xmlns:gs="http://www.opengis.net/pidflo/1.0">
            <gml:pos>43.58206959563555 6.974515914916991</gml:pos>
              <gs:radius uom="urn:ogc:def:uom:EPSG::9001">200.0</gs:radius>
        </gs:Circle>     
	</location>
	<path>
		<via source="ecrf1.gridgears.plugtests.net"/>
	</path>
	<service>urn:service:sos.police</service>
</findService>' >> http.log

sleep 5

curl --location --request POST 'http://127.0.0.1:8082' \
--header 'Content-Type: application/lost+xml' \
--data-raw '<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<findService xmlns="urn:ietf:params:xml:ns:lost1" recursive='\''true'\''>
	<location id="6020688f1ce1896d" profile="geodetic-2d">
        <gs:Circle srsName="urn:ogc:def:crs:EPSG::4326" xmlns:gml="http://www.opengis.net/gml" xmlns:gs="http://www.opengis.net/pidflo/1.0">
            <gml:pos>43.58206959563555 6.974515914916991</gml:pos>
              <gs:radius uom="urn:ogc:def:uom:EPSG::9001">200.0</gs:radius>
        </gs:Circle>     
	</location>
	<path>
		<via source="ecrf1.gridgears.plugtests.net"/>
		<via source="ecrf2.gridgears.plugtests.net"/>
	</path>
	<service>urn:service:sos.police</service>
</findService>' >> http.log
 No newline at end of file
+57 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd">

<!-- This program is free software; you can redistribute it and/or      -->
<!-- modify it under the terms of the GNU General Public License as     -->
<!-- published by the Free Software Foundation; either version 2 of the -->
<!-- License, or (at your option) any later version.                    -->
<!--                                                                    -->
<!-- This program is distributed in the hope that it will be useful,    -->
<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of     -->
<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the      -->
<!-- GNU General Public License for more details.                       -->
<!--                                                                    -->
<!-- You should have received a copy of the GNU General Public License  -->
<!-- along with this program; if not, write to the                      -->
<!-- Free Software Foundation, Inc.,                                    -->
<!-- 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA             -->
<!--                                                                    -->
<!--                 Sipp default 'uac' scenario.                       -->
<!--                                                                    -->

<scenario name="Basic Sipstone UAC">
  <!-- In client mode (sipp placing calls), the Call-ID MUST be         -->
  <!-- generated by sipp. To do so, use [call_id] keyword.                -->
  
  <send>
    <![CDATA[

      INVITE sip:[service]@127.0.0.1:5080 SIP/2.0
      Via: SIP/2.0/TCP [local_ip]:[local_port]
      From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]
      To: sut <sip:[service]@127.0.0.1:5080>
      Call-ID: [call_id]
      Cseq: 1 INVITE
      Contact: sip:sipp@[local_ip]:[local_port]
      Max-Forwards: 70
      Subject: Performance Test
      Content-Type: application/sdp
      Content-Length: [len]

      v=0
      o=FAST_V2R1 2006 2007 IN IP4 155.11.49.64
      s=-
      t=0 0
      m=audio 10500 RTP/AVP 8 0 18 4 96 97
      c=IN IP4 conftest.plugtests.net
      a=rtpmap:0 PCMU/8000
      a=rtpmap:18 G729/8000
      a=rtpmap:4 G723/8000
      a=rtpmap:96 AMR/8000
      a=rtpmap:97 telephone-event/8000
      a=fmtp:97 0-15
      a=sendrecv
    ]]>
  </send>  
</scenario>
+38 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd">

<!-- This program is free software; you can redistribute it and/or      -->
<!-- modify it under the terms of the GNU General Public License as     -->
<!-- published by the Free Software Foundation; either version 2 of the -->
<!-- License, or (at your option) any later version.                    -->
<!--                                                                    -->
<!-- This program is distributed in the hope that it will be useful,    -->
<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of     -->
<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the      -->
<!-- GNU General Public License for more details.                       -->
<!--                                                                    -->
<!-- You should have received a copy of the GNU General Public License  -->
<!-- along with this program; if not, write to the                      -->
<!-- Free Software Foundation, Inc.,                                    -->
<!-- 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA             -->
<!--                                                                    -->
<!--                 Sipp default 'uac' scenario.                       -->
<!--                                                                    -->

<scenario name="Basic Sipstone UAC">
  <!-- In client mode (sipp placing calls), the Call-ID MUST be         -->
  <!-- generated by sipp. To do so, use [call_id] keyword.                -->
  
  <recv request="INVITE">
      <action>          
          <exec command="./FindServiceRequest.sh"></exec>
      </action>
  </recv>

  <pause milliseconds="1500">
    <action>
      <exec command="sipp -t t1 -trace_msg -m 1 -sf Outgoing.xml 127.0.0.1:5080"></exec>
    </action>
  </pause>    
</scenario>
Loading