From 8df70164eabeb6d9f4fa4413823f167a07da06c7 Mon Sep 17 00:00:00 2001 From: Victor Seva Date: Tue, 7 Jul 2015 17:30:54 +0200 Subject: [PATCH] MT#6565 CE/PRO differences due to sems version - fix tap-test - fix bin/generate_test.sh: define CE too - scenarios: * invite_callforward * invite_voicebox Change-Id: I8ebad6ea580003e8e072204ad48bc4533eba0fe9 --- bin/check.py | 3 +- bin/generate_tests.sh | 2 +- bin/graph_flow.pl | 3 +- bin/show_flow.pl | 3 +- .../invite_callforward/0020_test.yml.tt2 | 24 +++++++- .../invite_callforward/0021_test.yml.tt2 | 41 +++++++++++++ .../invite_callforward/0022_test.yml.tt2 | 10 +++- .../invite_callforward/0029_test.yml.tt2 | 6 +- .../invite_callforward/0038_test.yml.tt2 | 52 ++++++++++++----- .../invite_callforward/0039_test.yml.tt2 | 41 +++++++++++++ .../invite_callforward/0040_test.yml.tt2 | 11 +++- scenarios/invite_voicebox/0012_test.yml.tt2 | 23 ++++++++ scenarios/invite_voicebox/0013_test.yml.tt2 | 58 +++++++++++++++++++ 13 files changed, 254 insertions(+), 23 deletions(-) create mode 100644 scenarios/invite_voicebox/0013_test.yml.tt2 diff --git a/bin/check.py b/bin/check.py index 3111f926..3f767352 100755 --- a/bin/check.py +++ b/bin/check.py @@ -124,7 +124,8 @@ class Test: @classmethod def compare(cls, val0, val1): logging.debug("val0:[%s]:'%s' val1:[%s]:'%s'" % - (type(val0), unicode(val0), type(val1), unicode(val1))) + (type(val0), unicode(val0), type(val1), + unicode(val1))) if isinstance(val0, basestring): result = re.search(val0, str(val1)) elif isinstance(val0, int): diff --git a/bin/generate_tests.sh b/bin/generate_tests.sh index 516f01f3..6708f768 100755 --- a/bin/generate_tests.sh +++ b/bin/generate_tests.sh @@ -60,7 +60,7 @@ if [[ $# -ne 1 ]]; then fi if [ "${PROFILE}" == "CE" ]; then - TPAGE_ARGS="" + TPAGE_ARGS="--define CE=true" elif [ "${PROFILE}" == "PRO" ]; then TPAGE_ARGS="--define PRO=true" else diff --git a/bin/graph_flow.pl b/bin/graph_flow.pl index 7e908b4b..93d97845 100755 --- a/bin/graph_flow.pl +++ b/bin/graph_flow.pl @@ -25,6 +25,7 @@ use Cwd 'abs_path'; use Data::Dumper; use GraphViz; use Getopt::Long; +use English; sub usage { @@ -54,7 +55,7 @@ if($json_in) { use JSON; my $json; { - local $/; #Enable 'slurp' mode + local $INPUT_RECORD_SEPARATOR = undef; #Enable 'slurp' mode open my $fh, "<", $filename; $json = <$fh>; close $fh; diff --git a/bin/show_flow.pl b/bin/show_flow.pl index 29141adc..2b10e165 100755 --- a/bin/show_flow.pl +++ b/bin/show_flow.pl @@ -24,6 +24,7 @@ use warnings; use Cwd 'abs_path'; use Data::Dumper; use Getopt::Long; +use English; sub usage { @@ -52,7 +53,7 @@ if($json_in) { use JSON; my $json; { - local $/; #Enable 'slurp' mode + local $INPUT_RECORD_SEPARATOR = undef; #Enable 'slurp' mode open my $fh, "<", $filename; $json = <$fh>; close $fh; diff --git a/scenarios/invite_callforward/0020_test.yml.tt2 b/scenarios/invite_callforward/0020_test.yml.tt2 index 08fa8285..1e5d93ab 100644 --- a/scenarios/invite_callforward/0020_test.yml.tt2 +++ b/scenarios/invite_callforward/0020_test.yml.tt2 @@ -1,4 +1,8 @@ flow: +[% IF PRO %] + - start|REPLY_ROUTE_NAT: + - exit|REPLY_ROUTE_NAT: +[% ELSE %] - start|DEFAULT_ROUTE: - start|ROUTE_NET_INFO: - return|ROUTE_NET_INFO: @@ -11,14 +15,31 @@ flow: - return|ROUTE_STOP_RTPPROXY: - start|ROUTE_OUTBOUND: - exit|ROUTE_OUTBOUND: +[% END %] sip_in: +[% IF PRO %] + - '^SIP/2.0 200 OK' + - 'CSeq: 3 BYE' + - 'Content-Length: 0' + - 'From: ' + - 'Contact: ' - 'CSeq: 10 INVITE' - 'Content-Type: application/sdp' sip_out: @@ -109,5 +109,9 @@ sip_out: 'P-App-Name: sbc', 'P-NGCP-Caller-Info: