[asterisk-commits] mmichelson: testsuite/asterisk/trunk r6076 - in /asterisk/trunk/tests: manage...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Dec 9 14:55:27 CST 2014


Author: mmichelson
Date: Tue Dec  9 14:55:23 2014
New Revision: 6076

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=6076
Log:
Add tests to ensure that AMI and ARI connected line change events are received when expected.

Review: https://reviewboard.asterisk.org/r/4232


Added:
    asterisk/trunk/tests/manager/connected_line/
    asterisk/trunk/tests/manager/connected_line/configs/
    asterisk/trunk/tests/manager/connected_line/configs/ast1/
    asterisk/trunk/tests/manager/connected_line/configs/ast1/extensions.conf   (with props)
    asterisk/trunk/tests/manager/connected_line/test-config.yaml   (with props)
    asterisk/trunk/tests/rest_api/channels/connected_line_update/
    asterisk/trunk/tests/rest_api/channels/connected_line_update/configs/
    asterisk/trunk/tests/rest_api/channels/connected_line_update/configs/ast1/
    asterisk/trunk/tests/rest_api/channels/connected_line_update/configs/ast1/extensions.conf   (with props)
    asterisk/trunk/tests/rest_api/channels/connected_line_update/test-config.yaml   (with props)
Modified:
    asterisk/trunk/tests/manager/tests.yaml
    asterisk/trunk/tests/rest_api/channels/tests.yaml

Added: asterisk/trunk/tests/manager/connected_line/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/manager/connected_line/configs/ast1/extensions.conf?view=auto&rev=6076
==============================================================================
--- asterisk/trunk/tests/manager/connected_line/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/manager/connected_line/configs/ast1/extensions.conf Tue Dec  9 14:55:23 2014
@@ -1,0 +1,4 @@
+[default]
+exten => s,1,Answer()
+same => n,Set(CONNECTEDLINE(all)=Test <1234)
+same => n,Hangup()

Propchange: asterisk/trunk/tests/manager/connected_line/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/manager/connected_line/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:keywords = 'Author Date Id Revision'

Propchange: asterisk/trunk/tests/manager/connected_line/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/manager/connected_line/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/manager/connected_line/test-config.yaml?view=auto&rev=6076
==============================================================================
--- asterisk/trunk/tests/manager/connected_line/test-config.yaml (added)
+++ asterisk/trunk/tests/manager/connected_line/test-config.yaml Tue Dec  9 14:55:23 2014
@@ -1,0 +1,48 @@
+testinfo:
+    summary: 'Ensure that NewConnectedLine event is sent when connected line is updated on a channel'
+    description: |
+        'A channel calls into an extension where the CONNECTEDLINE() function is used to update the
+        connected line name and number of the channel. The test ensures that a NewConnectedLine event
+        happens as a result and that it has the expected values.'
+
+test-modules:
+    test-object:
+        typename: test_case.TestCaseModule
+        config-section: test-config
+    modules:
+        -
+            config-section: ami-config
+            typename: ami.AMIEventModule
+        -
+            config-section: originator-config
+            typename: pluggable_modules.Originator
+
+test-config:
+    connect-ami: True
+
+ami-config:
+    -
+        type: 'headermatch'
+        id: '0'
+        conditions:
+            match:
+                Event: 'NewConnectedLine'
+                Channel: 'Local/s at default.*'
+        requirements:
+            match:
+                ConnectedLineName: 'Test'
+                ConnectedLineNum: '1234'
+        count: '1'
+        action: 'stop'
+
+originator-config:
+    trigger: 'ami_connect'
+
+
+properties:
+    minversion: '13.1.0'
+    dependencies:
+        - python: 'twisted'
+        - python: 'starpy'
+    tags:
+        - AMI

Propchange: asterisk/trunk/tests/manager/connected_line/test-config.yaml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/manager/connected_line/test-config.yaml
------------------------------------------------------------------------------
    svn:keywords = 'Author Date Id Revision'

Propchange: asterisk/trunk/tests/manager/connected_line/test-config.yaml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: asterisk/trunk/tests/manager/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/manager/tests.yaml?view=diff&rev=6076&r1=6075&r2=6076
==============================================================================
--- asterisk/trunk/tests/manager/tests.yaml (original)
+++ asterisk/trunk/tests/manager/tests.yaml Tue Dec  9 14:55:23 2014
@@ -19,5 +19,6 @@
     - test: 'status'
     - test: 'status_all_vars'
     - test: 'userevent'
+    - test: 'connected_line'
     # Temporarily disabled while failures are debugged
     #- test: 'response-time'

Added: asterisk/trunk/tests/rest_api/channels/connected_line_update/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/channels/connected_line_update/configs/ast1/extensions.conf?view=auto&rev=6076
==============================================================================
--- asterisk/trunk/tests/rest_api/channels/connected_line_update/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/rest_api/channels/connected_line_update/configs/ast1/extensions.conf Tue Dec  9 14:55:23 2014
@@ -1,0 +1,4 @@
+[default]
+exten => s,1,Answer()
+same => n,Stasis(testsuite)
+same => n,Hangup()

Propchange: asterisk/trunk/tests/rest_api/channels/connected_line_update/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/rest_api/channels/connected_line_update/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:keywords = 'Author Date Id Revision'

Propchange: asterisk/trunk/tests/rest_api/channels/connected_line_update/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/rest_api/channels/connected_line_update/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/channels/connected_line_update/test-config.yaml?view=auto&rev=6076
==============================================================================
--- asterisk/trunk/tests/rest_api/channels/connected_line_update/test-config.yaml (added)
+++ asterisk/trunk/tests/rest_api/channels/connected_line_update/test-config.yaml Tue Dec  9 14:55:23 2014
@@ -1,0 +1,56 @@
+testinfo:
+    summary: 'Ensures that ChannelConnectedLine events are received when expected.'
+    description: |
+        'A channel calls into a Stasis application. The application uses the CONNECTEDLINE()
+        function to update the connected line of the channel. We then ensure that a corresponding
+        ChannelConnectedLine event is received, and that the connected line name and number are
+        the expected values.'
+
+test-modules:
+    add-test-to-search-path: True
+    test-object:
+        typename: ari.AriTestObject
+    modules:
+        -
+            config-section: ari-config
+            typename: ari.WebSocketEventModule
+
+ari-config:
+    apps: testsuite
+    events:
+        -
+            conditions:
+                match:
+                    type: 'StasisStart'
+                    application: 'testsuite'
+                    args: []
+            count: 1
+            requests:
+                method: 'post'
+                uri: 'channels/{channel.id}/variable'
+                params:
+                    variable: 'CONNECTEDLINE(all)'
+                    value: 'TEST <1234>'
+        -
+            conditions:
+                match:
+                    type: 'ChannelConnectedLine'
+                    channel:
+                        connected:
+                            name: 'TEST'
+                            number: '1234'
+            count: 1
+            requests:
+                method: 'delete'
+                uri: 'channels/{channel.id}'
+
+properties:
+    minversion: '13.1.0'
+    dependencies:
+        - python: autobahn.websocket
+        - python: requests
+        - python: twisted
+        - python: starpy
+        - asterisk: res_ari_channels
+    tags:
+        - ARI

Propchange: asterisk/trunk/tests/rest_api/channels/connected_line_update/test-config.yaml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/rest_api/channels/connected_line_update/test-config.yaml
------------------------------------------------------------------------------
    svn:keywords = 'Author Date Id Revision'

Propchange: asterisk/trunk/tests/rest_api/channels/connected_line_update/test-config.yaml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: asterisk/trunk/tests/rest_api/channels/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/channels/tests.yaml?view=diff&rev=6076&r1=6075&r2=6076
==============================================================================
--- asterisk/trunk/tests/rest_api/channels/tests.yaml (original)
+++ asterisk/trunk/tests/rest_api/channels/tests.yaml Tue Dec  9 14:55:23 2014
@@ -8,3 +8,4 @@
     - test: 'snoop_spy'
     - test: 'snoop_id'
     - dir: 'playback'
+    - test: 'connected_line_update'




More information about the asterisk-commits mailing list