[asterisk-commits] file: testsuite/asterisk/trunk r4326 - in /asterisk/trunk/tests/rest_api: ./ ...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Nov 5 06:27:17 CST 2013
Author: file
Date: Tue Nov 5 06:27:15 2013
New Revision: 4326
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4326
Log:
Add a test covering origination using ARI.
(issue ASTERISK-22768)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2980/
Added:
asterisk/trunk/tests/rest_api/channels/
asterisk/trunk/tests/rest_api/channels/originate/
asterisk/trunk/tests/rest_api/channels/originate/channel_originate.py (with props)
asterisk/trunk/tests/rest_api/channels/originate/configs/
asterisk/trunk/tests/rest_api/channels/originate/configs/ast1/
asterisk/trunk/tests/rest_api/channels/originate/configs/ast1/extensions.conf (with props)
asterisk/trunk/tests/rest_api/channels/originate/test-config.yaml (with props)
asterisk/trunk/tests/rest_api/channels/tests.yaml (with props)
Modified:
asterisk/trunk/tests/rest_api/tests.yaml
Added: asterisk/trunk/tests/rest_api/channels/originate/channel_originate.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/channels/originate/channel_originate.py?view=auto&rev=4326
==============================================================================
--- asterisk/trunk/tests/rest_api/channels/originate/channel_originate.py (added)
+++ asterisk/trunk/tests/rest_api/channels/originate/channel_originate.py Tue Nov 5 06:27:15 2013
@@ -1,0 +1,23 @@
+'''
+Copyright (C) 2013, Digium, Inc.
+Joshua Colp <jcolp at digium.com>
+
+This program is free software, distributed under the terms of
+the GNU General Public License Version 2.
+'''
+
+import logging
+
+LOGGER = logging.getLogger(__name__)
+
+def on_kickoff_start(ari, event):
+ LOGGER.debug("on_kickoff_start(%r)" % event)
+ for x in xrange(50):
+ ari.post('channels', endpoint='Local/1000 at default', app='testsuite', appArgs='blast')
+ ari.delete('channels', event['channel']['id'])
+ return True
+
+def on_blast_start(ari, event):
+ LOGGER.debug("on_blast_start(%r)" % event)
+ ari.delete('channels', event['channel']['id'])
+ return True
Propchange: asterisk/trunk/tests/rest_api/channels/originate/channel_originate.py
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/rest_api/channels/originate/channel_originate.py
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/rest_api/channels/originate/channel_originate.py
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/rest_api/channels/originate/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/channels/originate/configs/ast1/extensions.conf?view=auto&rev=4326
==============================================================================
--- asterisk/trunk/tests/rest_api/channels/originate/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/rest_api/channels/originate/configs/ast1/extensions.conf Tue Nov 5 06:27:15 2013
@@ -1,0 +1,9 @@
+[default]
+
+exten => s,1,NoOp()
+ same => n,Answer()
+ same => n,Stasis(testsuite)
+ same => n,Hangup()
+
+exten => 1000,1,Answer
+ same => n,Wait(360)
Propchange: asterisk/trunk/tests/rest_api/channels/originate/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/rest_api/channels/originate/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/rest_api/channels/originate/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/rest_api/channels/originate/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/channels/originate/test-config.yaml?view=auto&rev=4326
==============================================================================
--- asterisk/trunk/tests/rest_api/channels/originate/test-config.yaml (added)
+++ asterisk/trunk/tests/rest_api/channels/originate/test-config.yaml Tue Nov 5 06:27:15 2013
@@ -1,0 +1,47 @@
+testinfo:
+ summary: Test originating calls to a Stasis application using ARI.
+ description: |
+ Originate a specific number of calls using ARI and verify all enter Stasis.
+
+test-modules:
+ add-test-to-search-path: True
+ test-object:
+ config-section: test-object-config
+ 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
+ callback:
+ module: channel_originate
+ method: on_kickoff_start
+ - conditions:
+ match:
+ type: StasisStart
+ application: testsuite
+ args: ['blast']
+ count: 50
+ callback:
+ module: channel_originate
+ method: on_blast_start
+
+properties:
+ minversion: '12.0.0'
+ dependencies:
+ - python : autobahn.websocket
+ - python : requests
+ - python : twisted
+ - python : starpy
+ - asterisk : res_ari_channels
+ - asterisk : app_echo
+ tags:
+ - ARI
Propchange: asterisk/trunk/tests/rest_api/channels/originate/test-config.yaml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/rest_api/channels/originate/test-config.yaml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/rest_api/channels/originate/test-config.yaml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/rest_api/channels/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/channels/tests.yaml?view=auto&rev=4326
==============================================================================
--- asterisk/trunk/tests/rest_api/channels/tests.yaml (added)
+++ asterisk/trunk/tests/rest_api/channels/tests.yaml Tue Nov 5 06:27:15 2013
@@ -1,0 +1,3 @@
+tests:
+ - test: 'originate'
+
Propchange: asterisk/trunk/tests/rest_api/channels/tests.yaml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/rest_api/channels/tests.yaml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/rest_api/channels/tests.yaml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: asterisk/trunk/tests/rest_api/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/rest_api/tests.yaml?view=diff&rev=4326&r1=4325&r2=4326
==============================================================================
--- asterisk/trunk/tests/rest_api/tests.yaml (original)
+++ asterisk/trunk/tests/rest_api/tests.yaml Tue Nov 5 06:27:15 2013
@@ -5,4 +5,6 @@
- test: 'CORS'
- dir: 'applications'
- dir: 'bridges'
+ - dir: 'channels'
- dir: 'recording'
+
More information about the asterisk-commits
mailing list