[asterisk-commits] file: testsuite/asterisk/trunk r4919 - in /asterisk/trunk/tests/apps/bridge/b...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Apr 1 10:11:46 CDT 2014


Author: file
Date: Tue Apr  1 10:11:36 2014
New Revision: 4919

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4919
Log:
Add test for the 'S' option of BridgeWait.

(closes issue ASTERISK-23354)
Reported by: Matt Jordan

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

Added:
    asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_s_option/
    asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_s_option/configs/
    asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_s_option/configs/ast1/
    asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_s_option/configs/ast1/extensions.conf   (with props)
    asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_s_option/test-config.yaml   (with props)
Modified:
    asterisk/trunk/tests/apps/bridge/bridge_wait/tests.yaml

Added: asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_s_option/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_s_option/configs/ast1/extensions.conf?view=auto&rev=4919
==============================================================================
--- asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_s_option/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_s_option/configs/ast1/extensions.conf Tue Apr  1 10:11:36 2014
@@ -1,0 +1,35 @@
+
+[holding]
+
+exten => bridge_holding,1,NoOp()
+     same => n,Set(wait_bridge=${STRFTIME(${EPOCH},GMT-6,%s)})
+     same => n,BridgeWait(default,participant,S(5))
+     same => n,Set(wait_bridge2=${STRFTIME(${EPOCH},GMT-6,%s)})
+     same => n,Set(difference=$[${wait_bridge2}-${wait_bridge}])
+     same => n,ExecIf($[$["${difference}"<"7"]&$["${difference}">"3"]]?UserEvent(CallResult))
+
+[default]
+
+exten => sendDTMF,1,NoOp()
+	same => n,Verbose(1, Sending DTMF Signal ${DTMF_TO_SEND})
+	same => n,SendDTMF(${DTMF_TO_SEND})
+	same => n,Goto(default,wait,1)
+
+exten => sendAudio,1,NoOp()
+	same => n,Verbose(1, Sending audio file ${TALK_AUDIO})
+	same => n,Playback(${TALK_AUDIO})
+	same => n,Goto(default,wait,1)
+
+exten => sendAudioWithDTMF,1,NoOp()
+	same => n,Verbose(1, Sending audio file ${TALK_AUDIO})
+	same => n,Playback(${TALK_AUDIO})
+	same => n,Verbose(1, Sending DTMF Signal ${DTMF_TO_SEND})
+	same => n,SendDTMF(${DTMF_TO_SEND})
+	same => n,Goto(default,wait,1)
+
+exten => hangup,1,NoOp()
+	same => n,Verbose(1, Hanging up)
+	same => n,Hangup()
+
+exten => wait,1,NoOp()
+	same => n,Wait(10000)

Propchange: asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_s_option/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_s_option/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_s_option/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_s_option/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_s_option/test-config.yaml?view=auto&rev=4919
==============================================================================
--- asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_s_option/test-config.yaml (added)
+++ asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_s_option/test-config.yaml Tue Apr  1 10:11:36 2014
@@ -1,0 +1,62 @@
+testinfo:
+    summary:    'Testing the S option of the BridgeWait application'
+    description: |
+        'This test required that a channel join a holding bridge using
+         the S option of the BridgeWait application, which ultimately
+         automatically exits the bridge after a specified duration.
+         So, the channel receives a UserEvent as long as the duration
+         of the holding bridge is between 3 to 7 seconds long.'
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: 'apptest.AppTest'
+
+test-object-config:
+  app: 'BridgeWait'
+  scenarios:
+    -
+      channels:
+        -
+          channel-id: 'Bridgey'
+          channel-name: 'Local/bridge_holding at holding'
+          context: 'default'
+          exten: 'wait'
+          start-on-create: True
+          events:
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'Hangup'
+                  Channel: 'Local/bridge_holding at holding-.*'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'Channel Hung Up'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'UserEvent'
+                  UserEvent: 'CallResult'
+              actions:
+                -
+                  action-type: 'set-expected-result'
+                  expected-result: 'CallResult is a success'
+                -
+                  action-type: 'hangup'
+                  delay: 1
+                -
+                  action-type: 'end-scenario'
+
+properties:
+    minversion: '12.0.0'
+    tags:
+      - bridge
+    dependencies:
+      - buildoption: 'TEST_FRAMEWORK'
+      - python: 'twisted'
+      - python: 'starpy'
+      - asterisk: 'app_userevent'
+      - asterisk: 'app_bridgewait'

Propchange: asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_s_option/test-config.yaml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_s_option/test-config.yaml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/apps/bridge/bridge_wait/bridge_wait_s_option/test-config.yaml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: asterisk/trunk/tests/apps/bridge/bridge_wait/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/bridge/bridge_wait/tests.yaml?view=diff&rev=4919&r1=4918&r2=4919
==============================================================================
--- asterisk/trunk/tests/apps/bridge/bridge_wait/tests.yaml (original)
+++ asterisk/trunk/tests/apps/bridge/bridge_wait/tests.yaml Tue Apr  1 10:11:36 2014
@@ -1,4 +1,5 @@
 # Enter tests here in the order they should be considered for execution:
 tests:
     - test: 'bridge_wait_e_options'
+    - test: 'bridge_wait_s_option'
     - test: 'bridge_wait_roles'




More information about the asterisk-commits mailing list