[asterisk-commits] pjsip/show endpoint,pjsip contact: Add Created as a valid Co... (testsuite[master])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Mar 15 14:18:47 CDT 2016
Anonymous Coward #1000019 has submitted this change and it was merged.
Change subject: pjsip/show_endpoint,pjsip_contact: Add Created as a valid Contact status
......................................................................
pjsip/show_endpoint,pjsip_contact: Add Created as a valid Contact status
Since the sorcery/realtime optimization is accelerating contact qualification,
contact status is reporting Created for these tests instead of Unknown.
For ami/show_endpoint, the Status match regex was updated from
'(Unknown|Reachable)' to '(Unknown|Created|Reachable)'.
For dialplan_functions/pjsip_contact, the dialplan was updated to do a regex
on (Unknown|Created|Reachable) instead of an exact match on Unknown. rtt was
also updated to a regex on (N/A|[0-9.]+) instead of an exact match on N/A..
Both tests passes with or without the optimization patch.
Change-Id: I0914a2bc8f5289c804e5e11bfd16e7c9e388c012
---
M tests/channels/pjsip/ami/show_endpoint/test-config.yaml
M tests/channels/pjsip/dialplan_functions/pjsip_contact/configs/ast1/extensions.conf
2 files changed, 6 insertions(+), 6 deletions(-)
Approvals:
Mark Michelson: Looks good to me, approved
Anonymous Coward #1000019: Verified
Joshua Colp: Looks good to me, but someone else must approve
diff --git a/tests/channels/pjsip/ami/show_endpoint/test-config.yaml b/tests/channels/pjsip/ami/show_endpoint/test-config.yaml
index ea89c04..a48c9b3 100644
--- a/tests/channels/pjsip/ami/show_endpoint/test-config.yaml
+++ b/tests/channels/pjsip/ami/show_endpoint/test-config.yaml
@@ -418,7 +418,7 @@
match:
AOR: 'user1'
URI: '(sip:user1 at 127.0.0.1:5062|sip:user1 at 127.0.0.2:5063)'
- Status: '(Unknown|Reachable)'
+ Status: '(Unknown|Created|Reachable)'
RoundtripUsec: '(N/A|0)'
EndpointName: 'user1'
count: 2
diff --git a/tests/channels/pjsip/dialplan_functions/pjsip_contact/configs/ast1/extensions.conf b/tests/channels/pjsip/dialplan_functions/pjsip_contact/configs/ast1/extensions.conf
index 529f32f..3557f12 100644
--- a/tests/channels/pjsip/dialplan_functions/pjsip_contact/configs/ast1/extensions.conf
+++ b/tests/channels/pjsip/dialplan_functions/pjsip_contact/configs/ast1/extensions.conf
@@ -6,7 +6,7 @@
same => n,Set(field=${LOCAL(ARG2)})
same => n,Set(expected=${LOCAL(ARG3)})
same => n,Verbose(1, Calling PJSIP_CONTACT for contact ${contact}, field ${field})
-same => n,GotoIf($["${PJSIP_CONTACT(${contact},${field})}"="${expected}"]?pass)
+same => n,GotoIf($[${REGEX("${expected}" ${PJSIP_CONTACT(${contact},${field})})}]?pass)
same => n,UserEvent(Result, Status: failed, Message: ${aor}, ${field} did not match expected value ${expected} - actual ${PJSIP_CONTACT(${contact},${field})})
same => n(pass),NoOp()
same => n,Return()
@@ -17,14 +17,14 @@
; Test Alice's (dynamic registration) properties
same => n,GoSub(default,test_variable,1(alice\;@81363c8ccd1bbe394538018e5bee371f,uri,sip:alice at 127.0.0.1:5061))
-same => n,GoSub(default,test_variable,1(alice\;@81363c8ccd1bbe394538018e5bee371f,status,Unknown))
-same => n,GoSub(default,test_variable,1(alice\;@81363c8ccd1bbe394538018e5bee371f,rtt,N/A))
+same => n,GoSub(default,test_variable,1(alice\;@81363c8ccd1bbe394538018e5bee371f,status,"(Unknown|Created|Reachable)"))
+same => n,GoSub(default,test_variable,1(alice\;@81363c8ccd1bbe394538018e5bee371f,rtt,"(N/A|[0-9.]+)"))
same => n,GoSub(default,test_variable,1(alice\;@81363c8ccd1bbe394538018e5bee371f,user_agent,Test))
; Test Bob's (static contact) properties
same => n,GoSub(default,test_variable,1(bob@@b6c3d120cfd9e85addf64ee8943f4eec,uri,sip:1000 at 127.0.0.1))
-same => n,GoSub(default,test_variable,1(bob@@b6c3d120cfd9e85addf64ee8943f4eec,status,Unknown))
-same => n,GoSub(default,test_variable,1(bob@@b6c3d120cfd9e85addf64ee8943f4eec,rtt,N/A))
+same => n,GoSub(default,test_variable,1(bob@@b6c3d120cfd9e85addf64ee8943f4eec,status,(Unknown|Created|Reachable)))
+same => n,GoSub(default,test_variable,1(bob@@b6c3d120cfd9e85addf64ee8943f4eec,rtt,"(N/A|[0-9.]+)"))
same => n,UserEvent(Result, Status: passed)
same => n,Hangup()
--
To view, visit https://gerrit.asterisk.org/2377
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I0914a2bc8f5289c804e5e11bfd16e7c9e388c012
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
More information about the asterisk-commits
mailing list