From 4de3e377d1e6add14930260e1323b41275b21377 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Fri, 29 Jun 2018 17:15:22 +0200 Subject: [PATCH] MGCP_Test: do not use constant IP addresses The RTP stream tests TC_two_crcx_and_unsolicited_rtp and TC_two_crcx_and_one_mdcx_rtp_ho, which were introduced recently with Change-Id I556a6efff0e74aab897bd8165200eec36e46629f, use hardcoded ip addresses (127.0.0.1) to establish the RTP streams that are used to test how the MGW reacts on unsolicited packets. This works fine when everything runs on local host but on docker it failes since the containers there have different ip-addresses. - replace hardcoded IP-Addresses with modulepar variable in TC_two_crcx_and_unsolicited_rtp and TC_two_crcx_and_one_mdcx_rtp_ho Change-Id: I5af5186f173c2b8564e8034249c82245acdd09f6 Related: OS#2703 --- mgw/MGCP_Test.ttcn | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mgw/MGCP_Test.ttcn b/mgw/MGCP_Test.ttcn index 8746c38d6..d816a7188 100644 --- a/mgw/MGCP_Test.ttcn +++ b/mgw/MGCP_Test.ttcn @@ -1164,8 +1164,8 @@ module MGCP_Test { f_sleep(0.5); /* Start inserting unsolicited RTP packets */ - f_rtpem_bind(RTPEM[2], "127.0.0.1", unsolicited_port); - f_rtpem_connect(RTPEM[2], "127.0.0.1", flow[0].mgw.portnr); + f_rtpem_bind(RTPEM[2], mp_local_ip, unsolicited_port); + f_rtpem_connect(RTPEM[2], mp_remote_ip, flow[0].mgw.portnr); f_rtpem_mode(RTPEM[2], RTPEM_MODE_TXONLY); f_sleep(0.5); @@ -1219,8 +1219,8 @@ module MGCP_Test { * transmitting for a while. We simulate this by injecting * some unsolicited packets on the behalf of the old source, * (old remote port) */ - f_rtpem_bind(RTPEM[2], "127.0.0.1", port_old); - f_rtpem_connect(RTPEM[2], "127.0.0.1", flow[0].mgw.portnr); + f_rtpem_bind(RTPEM[2], mp_local_ip, port_old); + f_rtpem_connect(RTPEM[2], mp_remote_ip, flow[0].mgw.portnr); f_rtpem_mode(RTPEM[2], RTPEM_MODE_TXONLY); f_sleep(1.0); f_rtpem_mode(RTPEM[2], RTPEM_MODE_NONE);