[Asterisk-code-review] pjsip/verify bodies: Update based on changes to presence URI. (testsuite[master])
Joshua Colp
asteriskteam at digium.com
Wed Nov 8 11:17:57 CST 2017
Joshua Colp has uploaded this change for review. ( https://gerrit.asterisk.org/7143
Change subject: pjsip/verify_bodies: Update based on changes to presence URI.
......................................................................
pjsip/verify_bodies: Update based on changes to presence URI.
The remote URI no longer contains the display name portion
so update the tests to reflect this.
ASTERISK-27290
Change-Id: I03e432b3e524791da26a41698bb5eabb619274a6
---
M tests/channels/pjsip/subscriptions/presence/verify_bodies/verify_pidf/test-config.yaml
M tests/channels/pjsip/subscriptions/presence/verify_bodies/verify_xpidf/test-config.yaml
2 files changed, 228 insertions(+), 4 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/43/7143/1
diff --git a/tests/channels/pjsip/subscriptions/presence/verify_bodies/verify_pidf/test-config.yaml b/tests/channels/pjsip/subscriptions/presence/verify_bodies/verify_pidf/test-config.yaml
index 027c6e1..8177a24 100644
--- a/tests/channels/pjsip/subscriptions/presence/verify_bodies/verify_pidf/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/presence/verify_bodies/verify_pidf/test-config.yaml
@@ -37,7 +37,12 @@
typename: 'sipp.SIPpTestCase'
modules:
-
- config-section: test-config
+ maxversion: ['13.18.0', '15.1.0']
+ config-section: test-config-v13.18.0
+ typename: 'presence.BodyCheck'
+ -
+ minversion: ['13.19.0', '15.2.0']
+ config-section: test-config-v13.19.0
typename: 'presence.BodyCheck'
-
config-section: ami-config
@@ -52,7 +57,7 @@
- { 'key-args': {'scenario': 'subscribe.xml', '-p': '5061'},
'ordered-args': ['-timeout_error'] }
-test-config:
+test-config-v13.18.0:
# Expected number of NOTIFY messages with the expected body type.
expected_notifies: '7'
# Expected body type.
@@ -157,6 +162,111 @@
basic: 'open'
contact: '^"alice" <sip:alice at 127.0.0.1(:5060)?>$'
+test-config-v13.19.0:
+ # Expected number of NOTIFY messages with the expected body type.
+ expected_notifies: '7'
+ # Expected body type.
+ expected_body_type: 'pidf'
+ # Expected body.
+ expected_body:
+ # Expected namespaces for PIDF bodies.
+ namespaces:
+ default: 'urn:ietf:params:xml:ns:pidf'
+ pp: 'urn:ietf:params:xml:ns:pidf:data-model'
+ ep: 'urn:ietf:params:xml:ns:pidf:rpid'
+ # All expected element tag names for PIDF bodies.
+ tags:
+ ['presence', 'note', 'tuple', 'status', 'basic', 'contact',
+ 'pp:person', 'ep:activities', 'ep:on-the-phone']
+ # Regex patterns for element attributes for each body in order. Some
+ # attribute values of elements differ for each body depending on the
+ # body type and state changes. Therefore we list them in the order that
+ # matches the state changes. For this test the attribute values should
+ # be the same for all bodies.
+ attributes:
+ -
+ presence:
+ entity: '^sip:bob at 127.0.0.1(:5060)?$'
+ tuple:
+ id: '^bob$'
+ contact:
+ priority: '^1$'
+ -
+ presence:
+ entity: '^sip:bob at 127.0.0.1(:5060)?$'
+ tuple:
+ id: '^bob$'
+ contact:
+ priority: '^1$'
+ -
+ presence:
+ entity: '^sip:bob at 127.0.0.1(:5060)?$'
+ tuple:
+ id: '^bob$'
+ contact:
+ priority: '^1$'
+ -
+ presence:
+ entity: '^sip:bob at 127.0.0.1(:5060)?$'
+ tuple:
+ id: '^bob$'
+ contact:
+ priority: '^1$'
+ -
+ presence:
+ entity: '^sip:bob at 127.0.0.1(:5060)?$'
+ tuple:
+ id: '^bob$'
+ contact:
+ priority: '^1$'
+ -
+ presence:
+ entity: '^sip:bob at 127.0.0.1(:5060)?$'
+ tuple:
+ id: '^bob$'
+ contact:
+ priority: '^1$'
+ -
+ presence:
+ entity: '^sip:bob at 127.0.0.1(:5060)?$'
+ tuple:
+ id: '^bob$'
+ contact:
+ priority: '^1$'
+ # Regex patterns for element text for each body in order. Some text
+ # of elements differ for each body depending on the body type and state
+ # changes. Therefore we list them in the order that matches the state
+ # changes.
+ text:
+ -
+ note: 'Ready'
+ basic: 'open'
+ contact: '^sip:alice at 127.0.0.1(:5060)?$'
+ -
+ note: 'Ringing'
+ basic: 'open'
+ contact: '^sip:alice at 127.0.0.1(:5060)?$'
+ -
+ note: 'On the phone'
+ basic: 'open'
+ contact: '^sip:alice at 127.0.0.1(:5060)?$'
+ -
+ note: 'On hold'
+ basic: 'open'
+ contact: '^sip:alice at 127.0.0.1(:5060)?$'
+ -
+ note: 'On the phone'
+ basic: 'open'
+ contact: '^sip:alice at 127.0.0.1(:5060)?$'
+ -
+ note: 'Unavailable'
+ basic: 'closed'
+ contact: '^sip:alice at 127.0.0.1(:5060)?$'
+ -
+ note: 'Ready'
+ basic: 'open'
+ contact: '^sip:alice at 127.0.0.1(:5060)?$'
+
ami-config:
-
ami-events:
diff --git a/tests/channels/pjsip/subscriptions/presence/verify_bodies/verify_xpidf/test-config.yaml b/tests/channels/pjsip/subscriptions/presence/verify_bodies/verify_xpidf/test-config.yaml
index 8918bae..a27ec41 100644
--- a/tests/channels/pjsip/subscriptions/presence/verify_bodies/verify_xpidf/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/presence/verify_bodies/verify_xpidf/test-config.yaml
@@ -37,7 +37,12 @@
typename: 'sipp.SIPpTestCase'
modules:
-
- config-section: test-config
+ maxversion: ['13.18.0', '15.1.0']
+ config-section: test-config-v13.18.0
+ typename: 'presence.BodyCheck'
+ -
+ minversion: ['13.19.0', '15.2.0']
+ config-section: test-config-v13.19.0
typename: 'presence.BodyCheck'
-
config-section: ami-config
@@ -52,7 +57,7 @@
- { 'key-args': {'scenario': 'subscribe.xml', '-p': '5061'},
'ordered-args': ['-timeout_error'] }
-test-config:
+test-config-v13.18.0:
# Expected number of NOTIFY messages with the expected body type.
expected_notifies: '7'
# Expected body type.
@@ -161,6 +166,115 @@
msnsubstatus:
substatus: '^online$'
+test-config-v13.19.0:
+ # Expected number of NOTIFY messages with the expected body type.
+ expected_notifies: '7'
+ # Expected body type.
+ expected_body_type: 'xpidf'
+ # Expected body.
+ expected_body:
+ # All expected element tag names for XPIDF bodies.
+ tags:
+ ['presence', 'presentity', 'atom', 'address', 'status',
+ 'msnsubstatus']
+ # Regex patterns for element attributes for each body in order. Some
+ # attribute values of elements differ for each body depending on the
+ # body type and state changes. Therefore we list them in the order that
+ # matches the state changes. For this test some attribute values will
+ # differ between all bodies.
+ attributes:
+ -
+ presentity:
+ uri: '^sip:bob at 127.0.0.1(:5060)?;method=SUBSCRIBE$'
+ atom:
+ atomid: '^[a-z0-9-]+$'
+ id: '^bob$'
+ address:
+ uri: '^sip:alice at 127.0.0.1(:5060)?;user=ip$'
+ priority: '^0\.80000$'
+ status:
+ status: '^open$'
+ msnsubstatus:
+ substatus: '^online$'
+ -
+ presentity:
+ uri: '^sip:bob at 127.0.0.1(:5060)?;method=SUBSCRIBE$'
+ atom:
+ atomid: '^[a-z0-9-]+$'
+ id: '^bob$'
+ address:
+ uri: '^sip:alice at 127.0.0.1(:5060)?;user=ip$'
+ priority: '^0\.80000$'
+ status:
+ status: '^inuse$'
+ msnsubstatus:
+ substatus: '^onthephone$'
+ -
+ presentity:
+ uri: '^sip:bob at 127.0.0.1(:5060)?;method=SUBSCRIBE$'
+ atom:
+ atomid: '^[a-z0-9-]+$'
+ id: '^bob$'
+ address:
+ uri: '^sip:alice at 127.0.0.1(:5060)?;user=ip$'
+ priority: '^0\.80000$'
+ status:
+ status: '^inuse$'
+ msnsubstatus:
+ substatus: '^onthephone$'
+ -
+ presentity:
+ uri: '^sip:bob at 127.0.0.1(:5060)?;method=SUBSCRIBE$'
+ atom:
+ atomid: '^[a-z0-9-]+$'
+ id: '^bob$'
+ address:
+ uri: '^sip:alice at 127.0.0.1(:5060)?;user=ip$'
+ priority: '^0\.80000$'
+ status:
+ status: '^inuse$'
+ msnsubstatus:
+ substatus: '^onthephone$'
+ -
+ presentity:
+ uri: '^sip:bob at 127.0.0.1(:5060)?;method=SUBSCRIBE$'
+ atom:
+ atomid: '^[a-z0-9-]+$'
+ id: '^bob$'
+ address:
+ uri: '^sip:alice at 127.0.0.1(:5060)?;user=ip$'
+ priority: '^0\.80000$'
+ status:
+ status: '^inuse$'
+ msnsubstatus:
+ substatus: '^onthephone$'
+ -
+ presentity:
+ uri: '^sip:bob at 127.0.0.1(:5060)?;method=SUBSCRIBE$'
+ atom:
+ atomid: '^[a-z0-9-]+$'
+ id: '^bob$'
+ address:
+ uri: '^sip:alice at 127.0.0.1(:5060)?;user=ip$'
+ priority: '^0\.80000$'
+ status:
+ status: '^closed$'
+ msnsubstatus:
+ substatus: '^offline$'
+ -
+ presentity:
+ uri: '^sip:bob at 127.0.0.1(:5060)?;method=SUBSCRIBE$'
+ atom:
+ atomid: '^[a-z0-9-]+$'
+ id: '^bob$'
+ address:
+ uri: '^sip:alice at 127.0.0.1(:5060)?;user=ip$'
+ priority: '^0\.80000$'
+ status:
+ status: '^open$'
+ msnsubstatus:
+ substatus: '^online$'
+
ami-config:
-
ami-events:
--
To view, visit https://gerrit.asterisk.org/7143
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I03e432b3e524791da26a41698bb5eabb619274a6
Gerrit-Change-Number: 7143
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171108/7685c31c/attachment-0001.html>
More information about the asterisk-code-review
mailing list