<p>Joshua Colp has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/7143">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">pjsip/verify_bodies: Update based on changes to presence URI.<br><br>The remote URI no longer contains the display name portion<br>so update the tests to reflect this.<br><br>ASTERISK-27290<br><br>Change-Id: I03e432b3e524791da26a41698bb5eabb619274a6<br>---<br>M tests/channels/pjsip/subscriptions/presence/verify_bodies/verify_pidf/test-config.yaml<br>M tests/channels/pjsip/subscriptions/presence/verify_bodies/verify_xpidf/test-config.yaml<br>2 files changed, 228 insertions(+), 4 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/43/7143/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">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<br>index 027c6e1..8177a24 100644<br>--- a/tests/channels/pjsip/subscriptions/presence/verify_bodies/verify_pidf/test-config.yaml<br>+++ b/tests/channels/pjsip/subscriptions/presence/verify_bodies/verify_pidf/test-config.yaml<br>@@ -37,7 +37,12 @@<br>         typename: 'sipp.SIPpTestCase'<br>     modules:<br>         -<br>-            config-section: test-config<br>+            maxversion: ['13.18.0', '15.1.0']<br>+            config-section: test-config-v13.18.0<br>+            typename: 'presence.BodyCheck'<br>+        -<br>+            minversion: ['13.19.0', '15.2.0']<br>+            config-section: test-config-v13.19.0<br>             typename: 'presence.BodyCheck'<br>         -<br>             config-section: ami-config<br>@@ -52,7 +57,7 @@<br>                 - { 'key-args': {'scenario': 'subscribe.xml', '-p': '5061'},<br>                     'ordered-args': ['-timeout_error'] }<br> <br>-test-config:<br>+test-config-v13.18.0:<br>     # Expected number of NOTIFY messages with the expected body type.<br>     expected_notifies: '7'<br>     # Expected body type.<br>@@ -157,6 +162,111 @@<br>                 basic: 'open'<br>                 contact: '^"alice" <sip:alice@127.0.0.1(:5060)?>$'<br> <br>+test-config-v13.19.0:<br>+    # Expected number of NOTIFY messages with the expected body type.<br>+    expected_notifies: '7'<br>+    # Expected body type.<br>+    expected_body_type: 'pidf'<br>+    # Expected body.<br>+    expected_body:<br>+        # Expected namespaces for PIDF bodies.<br>+        namespaces:<br>+            default: 'urn:ietf:params:xml:ns:pidf'<br>+            pp: 'urn:ietf:params:xml:ns:pidf:data-model'<br>+            ep: 'urn:ietf:params:xml:ns:pidf:rpid'<br>+        # All expected element tag names for PIDF bodies.<br>+        tags:<br>+            ['presence', 'note', 'tuple', 'status', 'basic', 'contact',<br>+             'pp:person', 'ep:activities', 'ep:on-the-phone']<br>+        # Regex patterns for element attributes for each body in order. Some<br>+        # attribute values of elements differ for each body depending on the<br>+        # body type and state changes. Therefore we list them in the order that<br>+        # matches the state changes. For this test the attribute values should<br>+        # be the same for all bodies.<br>+        attributes:<br>+            -<br>+                presence:<br>+                    entity: '^sip:bob@127.0.0.1(:5060)?$'<br>+                tuple:<br>+                    id: '^bob$'<br>+                contact:<br>+                    priority: '^1$'<br>+            -<br>+                presence:<br>+                    entity: '^sip:bob@127.0.0.1(:5060)?$'<br>+                tuple:<br>+                    id: '^bob$'<br>+                contact:<br>+                    priority: '^1$'<br>+            -<br>+                presence:<br>+                    entity: '^sip:bob@127.0.0.1(:5060)?$'<br>+                tuple:<br>+                    id: '^bob$'<br>+                contact:<br>+                    priority: '^1$'<br>+            -<br>+                presence:<br>+                    entity: '^sip:bob@127.0.0.1(:5060)?$'<br>+                tuple:<br>+                    id: '^bob$'<br>+                contact:<br>+                    priority: '^1$'<br>+            -<br>+                presence:<br>+                    entity: '^sip:bob@127.0.0.1(:5060)?$'<br>+                tuple:<br>+                    id: '^bob$'<br>+                contact:<br>+                    priority: '^1$'<br>+            -<br>+                presence:<br>+                    entity: '^sip:bob@127.0.0.1(:5060)?$'<br>+                tuple:<br>+                    id: '^bob$'<br>+                contact:<br>+                    priority: '^1$'<br>+            -<br>+                presence:<br>+                    entity: '^sip:bob@127.0.0.1(:5060)?$'<br>+                tuple:<br>+                    id: '^bob$'<br>+                contact:<br>+                    priority: '^1$'<br>+        # Regex patterns for element text for each body in order. Some text<br>+        # of elements differ for each body depending on the body type and state<br>+        # changes. Therefore we list them in the order that matches the state<br>+        # changes.<br>+        text:<br>+            -<br>+                note: 'Ready'<br>+                basic: 'open'<br>+                contact: '^sip:alice@127.0.0.1(:5060)?$'<br>+            -<br>+                note: 'Ringing'<br>+                basic: 'open'<br>+                contact: '^sip:alice@127.0.0.1(:5060)?$'<br>+            -<br>+                note: 'On the phone'<br>+                basic: 'open'<br>+                contact: '^sip:alice@127.0.0.1(:5060)?$'<br>+            -<br>+                note: 'On hold'<br>+                basic: 'open'<br>+                contact: '^sip:alice@127.0.0.1(:5060)?$'<br>+            -<br>+                note: 'On the phone'<br>+                basic: 'open'<br>+                contact: '^sip:alice@127.0.0.1(:5060)?$'<br>+            -<br>+                note: 'Unavailable'<br>+                basic: 'closed'<br>+                contact: '^sip:alice@127.0.0.1(:5060)?$'<br>+            -<br>+                note: 'Ready'<br>+                basic: 'open'<br>+                contact: '^sip:alice@127.0.0.1(:5060)?$'<br>+<br> ami-config:<br>     -<br>         ami-events:<br>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<br>index 8918bae..a27ec41 100644<br>--- a/tests/channels/pjsip/subscriptions/presence/verify_bodies/verify_xpidf/test-config.yaml<br>+++ b/tests/channels/pjsip/subscriptions/presence/verify_bodies/verify_xpidf/test-config.yaml<br>@@ -37,7 +37,12 @@<br>         typename: 'sipp.SIPpTestCase'<br>     modules:<br>         -<br>-            config-section: test-config<br>+            maxversion: ['13.18.0', '15.1.0']<br>+            config-section: test-config-v13.18.0<br>+            typename: 'presence.BodyCheck'<br>+        -<br>+            minversion: ['13.19.0', '15.2.0']<br>+            config-section: test-config-v13.19.0<br>             typename: 'presence.BodyCheck'<br>         -<br>             config-section: ami-config<br>@@ -52,7 +57,7 @@<br>                 - { 'key-args': {'scenario': 'subscribe.xml', '-p': '5061'},<br>                     'ordered-args': ['-timeout_error'] }<br> <br>-test-config:<br>+test-config-v13.18.0:<br>     # Expected number of NOTIFY messages with the expected body type.<br>     expected_notifies: '7'<br>     # Expected body type.<br>@@ -161,6 +166,115 @@<br>                 msnsubstatus:<br>                     substatus: '^online$'<br> <br>+test-config-v13.19.0:<br>+    # Expected number of NOTIFY messages with the expected body type.<br>+    expected_notifies: '7'<br>+    # Expected body type.<br>+    expected_body_type: 'xpidf'<br>+    # Expected body.<br>+    expected_body:<br>+        # All expected element tag names for XPIDF bodies.<br>+        tags:<br>+            ['presence', 'presentity', 'atom', 'address', 'status',<br>+             'msnsubstatus']<br>+        # Regex patterns for element attributes for each body in order. Some<br>+        # attribute values of elements differ for each body depending on the<br>+        # body type and state changes. Therefore we list them in the order that<br>+        # matches the state changes. For this test some attribute values will<br>+        # differ between all bodies.<br>+        attributes:<br>+            -<br>+                presentity:<br>+                    uri: '^sip:bob@127.0.0.1(:5060)?;method=SUBSCRIBE$'<br>+                atom:<br>+                    atomid: '^[a-z0-9-]+$'<br>+                    id: '^bob$'<br>+                address:<br>+                    uri: '^sip:alice@127.0.0.1(:5060)?;user=ip$'<br>+                    priority: '^0\.80000$'<br>+                status:<br>+                    status: '^open$'<br>+                msnsubstatus:<br>+                    substatus: '^online$'<br>+            -<br>+                presentity:<br>+                    uri: '^sip:bob@127.0.0.1(:5060)?;method=SUBSCRIBE$'<br>+                atom:<br>+                    atomid: '^[a-z0-9-]+$'<br>+                    id: '^bob$'<br>+                address:<br>+                    uri: '^sip:alice@127.0.0.1(:5060)?;user=ip$'<br>+                    priority: '^0\.80000$'<br>+                status:<br>+                    status: '^inuse$'<br>+                msnsubstatus:<br>+                    substatus: '^onthephone$'<br>+            -<br>+                presentity:<br>+                    uri: '^sip:bob@127.0.0.1(:5060)?;method=SUBSCRIBE$'<br>+                atom:<br>+                    atomid: '^[a-z0-9-]+$'<br>+                    id: '^bob$'<br>+                address:<br>+                    uri: '^sip:alice@127.0.0.1(:5060)?;user=ip$'<br>+                    priority: '^0\.80000$'<br>+                status:<br>+                    status: '^inuse$'<br>+                msnsubstatus:<br>+                    substatus: '^onthephone$'<br>+            -<br>+                presentity:<br>+                    uri: '^sip:bob@127.0.0.1(:5060)?;method=SUBSCRIBE$'<br>+                atom:<br>+                    atomid: '^[a-z0-9-]+$'<br>+                    id: '^bob$'<br>+                address:<br>+                    uri: '^sip:alice@127.0.0.1(:5060)?;user=ip$'<br>+                    priority: '^0\.80000$'<br>+                status:<br>+                    status: '^inuse$'<br>+                msnsubstatus:<br>+                    substatus: '^onthephone$'<br>+            -<br>+                presentity:<br>+                    uri: '^sip:bob@127.0.0.1(:5060)?;method=SUBSCRIBE$'<br>+                atom:<br>+                    atomid: '^[a-z0-9-]+$'<br>+                    id: '^bob$'<br>+                address:<br>+                    uri: '^sip:alice@127.0.0.1(:5060)?;user=ip$'<br>+                    priority: '^0\.80000$'<br>+                status:<br>+                    status: '^inuse$'<br>+                msnsubstatus:<br>+                    substatus: '^onthephone$'<br>+            -<br>+                presentity:<br>+                    uri: '^sip:bob@127.0.0.1(:5060)?;method=SUBSCRIBE$'<br>+                atom:<br>+                    atomid: '^[a-z0-9-]+$'<br>+                    id: '^bob$'<br>+                address:<br>+                    uri: '^sip:alice@127.0.0.1(:5060)?;user=ip$'<br>+                    priority: '^0\.80000$'<br>+                status:<br>+                    status: '^closed$'<br>+                msnsubstatus:<br>+                    substatus: '^offline$'<br>+            -<br>+                presentity:<br>+                    uri: '^sip:bob@127.0.0.1(:5060)?;method=SUBSCRIBE$'<br>+                atom:<br>+                    atomid: '^[a-z0-9-]+$'<br>+                    id: '^bob$'<br>+                address:<br>+                    uri: '^sip:alice@127.0.0.1(:5060)?;user=ip$'<br>+                    priority: '^0\.80000$'<br>+                status:<br>+                    status: '^open$'<br>+                msnsubstatus:<br>+                    substatus: '^online$'<br>+<br> ami-config:<br>     -<br>         ami-events:<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/7143">change 7143</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/7143"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: testsuite </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I03e432b3e524791da26a41698bb5eabb619274a6 </div>
<div style="display:none"> Gerrit-Change-Number: 7143 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Joshua Colp <jcolp@digium.com> </div>