[asterisk-commits] tests/hep/pjsip-ipv6: Be tolerant to different IPv6 nomencla... (testsuite[master])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Oct 5 19:28:33 CDT 2015
Anonymous Coward #1000019 has submitted this change and it was merged.
Change subject: tests/hep/pjsip-ipv6: Be tolerant to different IPv6 nomenclatures
......................................................................
tests/hep/pjsip-ipv6: Be tolerant to different IPv6 nomenclatures
An IPv6 address may include the brackets '['/']' or it may omit them.
It is possible for Asterisk to change (at a minimum) the connection address
in the SDP to use one nomenclature over another depending on whether or not
the address has been cached recently. As a result, the regex handling the
200 OK would sporadically fail.
This patch makes the checking of the IPv6 addresses more tolerant to both
nomenclatures. It does this on values that *may* be produced by Asterisk in
packets received from Asterisk by the SIPp scenario. This should make the test
more reliable in the long run.
Change-Id: I747d45fc6537f9d4f92c62da2c6a44c758a05e9d
---
M tests/hep/pjsip-ipv6/test-config.yaml
1 file changed, 10 insertions(+), 10 deletions(-)
Approvals:
Anonymous Coward #1000019: Verified
Joshua Colp: Looks good to me, approved
diff --git a/tests/hep/pjsip-ipv6/test-config.yaml b/tests/hep/pjsip-ipv6/test-config.yaml
index f5406ec..89aa7e2 100644
--- a/tests/hep/pjsip-ipv6/test-config.yaml
+++ b/tests/hep/pjsip-ipv6/test-config.yaml
@@ -93,13 +93,13 @@
decode: 'SIP'
value:
- 'SIP/2.0 200 OK'
- - 'Via: SIP/2.0/UDP \[::1\]:5067;rport=5067;received=::1;branch=(.*)'
+ - 'Via: SIP/2.0/UDP [\[]?::1[\]]?:5067;rport=5067;received=[\[]?::1[\]]?;branch=(.*)'
- 'Call-ID: (.*?)@::1'
- - 'From: "test1" <sip:alice-ipv6-udp@\[::1\]>;tag=(.*)'
- - 'To: "test" <sip:test@\[::1\]>;tag=(.*)'
+ - 'From: "test1" <sip:alice-ipv6-udp@[\[]?::1[\]]?>;tag=(.*)'
+ - 'To: "test" <sip:test@[\[]?::1[\]]?>;tag=(.*)'
- 'CSeq: 1 INVITE'
- 'Server: (.*)'
- - 'Contact: <sip:\[::1\]:5060>'
+ - 'Contact: <sip:[\[]?::1[\]]?:5060>'
- 'Allow: (.*)'
- 'Supported: 100rel, timer, replaces, norefersub'
- 'Content-Type: application/sdp'
@@ -107,7 +107,7 @@
- '(.*)'
- '(.*)'
- 's=Asterisk'
- - 'c=IN IP6 \[::1\]'
+ - 'c=IN IP6 [\[]?::1[\]]?'
- 't=0 0'
- 'm=audio(.*?)RTP/AVP 0 8 101'
- 'a=rtpmap:0 PCMU/8000'
@@ -161,13 +161,13 @@
payload:
decode: 'SIP'
value:
- - 'BYE sip:echo@\[::1\]:5060 SIP/2.0'
- - 'Via: SIP/2.0/UDP \[::1\]:5067;branch=(.*)'
- - 'From: test1 <sip:alice-ipv6-udp@\[::1\]:5067>;tag=(.*)'
- - 'To: test <sip:test@\[::1\]:5060>;tag=(.*)'
+ - 'BYE sip:echo@[\[]?::1[\]]?:5060 SIP/2.0'
+ - 'Via: SIP/2.0/UDP [\[]?::1[\]]?:5067;branch=(.*)'
+ - 'From: test1 <sip:alice-ipv6-udp@[\[]?::1[\]]?:5067>;tag=(.*)'
+ - 'To: test <sip:test@[\[]?::1[\]]?:5060>;tag=(.*)'
- 'Call-ID: (.*?)@::1'
- 'CSeq: 2 BYE'
- - 'Contact: <sip:test@\[::1\]:5067;transport=UDP>'
+ - 'Contact: <sip:test@[\[]?::1[\]]?:5067;transport=UDP>'
- 'Max-Forwards: 70'
- 'Subject: Test'
- 'Content-Length: 0'
--
To view, visit https://gerrit.asterisk.org/1378
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I747d45fc6537f9d4f92c62da2c6a44c758a05e9d
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
More information about the asterisk-commits
mailing list