[svn-commits] rmudgett: testsuite/asterisk/trunk r6268 - in /asterisk/trunk/tests/apps: ./ ...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Jan 13 12:23:53 CST 2015


Author: rmudgett
Date: Tue Jan 13 12:23:47 2015
New Revision: 6268

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=6268
Log:
testsuite: app_macro tests for channel redirect while the macro is active.

Test channel redirect when a macro is active.
1) Redirect while in an active macro to an external dialplan location.
2) Redirect while in an active macro to an extension in the macro context.
3) Park while in an active macro and timeout to an external dialplan location.
4) Park while in an active macro and timeout to an extension in the macro context.

ASTERISK-23850
Reported by: Andrew Nagy

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

Added:
    asterisk/trunk/tests/apps/macro/
    asterisk/trunk/tests/apps/macro/park_timeout_inside/
    asterisk/trunk/tests/apps/macro/park_timeout_inside/configs/
    asterisk/trunk/tests/apps/macro/park_timeout_inside/configs/ast1/
    asterisk/trunk/tests/apps/macro/park_timeout_inside/configs/ast1/extensions.conf   (with props)
    asterisk/trunk/tests/apps/macro/park_timeout_inside/configs/ast1/res_parking.conf   (with props)
    asterisk/trunk/tests/apps/macro/park_timeout_inside/test-config.yaml   (with props)
    asterisk/trunk/tests/apps/macro/park_timeout_outside/
    asterisk/trunk/tests/apps/macro/park_timeout_outside/configs/
    asterisk/trunk/tests/apps/macro/park_timeout_outside/configs/ast1/
    asterisk/trunk/tests/apps/macro/park_timeout_outside/configs/ast1/extensions.conf   (with props)
    asterisk/trunk/tests/apps/macro/park_timeout_outside/configs/ast1/res_parking.conf   (with props)
    asterisk/trunk/tests/apps/macro/park_timeout_outside/test-config.yaml   (with props)
    asterisk/trunk/tests/apps/macro/redirect_inside/
    asterisk/trunk/tests/apps/macro/redirect_inside/configs/
    asterisk/trunk/tests/apps/macro/redirect_inside/configs/ast1/
    asterisk/trunk/tests/apps/macro/redirect_inside/configs/ast1/extensions.conf   (with props)
    asterisk/trunk/tests/apps/macro/redirect_inside/test-config.yaml   (with props)
    asterisk/trunk/tests/apps/macro/redirect_outside/
    asterisk/trunk/tests/apps/macro/redirect_outside/configs/
    asterisk/trunk/tests/apps/macro/redirect_outside/configs/ast1/
    asterisk/trunk/tests/apps/macro/redirect_outside/configs/ast1/extensions.conf   (with props)
    asterisk/trunk/tests/apps/macro/redirect_outside/test-config.yaml   (with props)
    asterisk/trunk/tests/apps/macro/tests.yaml   (with props)
Modified:
    asterisk/trunk/tests/apps/tests.yaml

Added: asterisk/trunk/tests/apps/macro/park_timeout_inside/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/macro/park_timeout_inside/configs/ast1/extensions.conf?view=auto&rev=6268
==============================================================================
--- asterisk/trunk/tests/apps/macro/park_timeout_inside/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/apps/macro/park_timeout_inside/configs/ast1/extensions.conf Tue Jan 13 12:23:47 2015
@@ -1,0 +1,18 @@
+[macro-park_me]
+exten => s,1,NoOp(Inside macro)
+same => n,Park(default,sc(macro-park_me,s,500))
+same => n,Hangup()
+
+; After a park timeout to here we are no longer running a Macro
+; but just executing extensions within a context.
+same => 500,NoOp(Channel timed out of parking lot)
+same => n,UserEvent(ParkTimeout)
+same => n,Echo()
+same => n,Hangup()
+
+
+[default]
+
+exten => s,1,NoOp(Initial dialplan location)
+same => n,Macro(park_me)
+same => n,Hangup()

Propchange: asterisk/trunk/tests/apps/macro/park_timeout_inside/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:eol-style = native

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

Propchange: asterisk/trunk/tests/apps/macro/park_timeout_inside/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/apps/macro/park_timeout_inside/configs/ast1/res_parking.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/macro/park_timeout_inside/configs/ast1/res_parking.conf?view=auto&rev=6268
==============================================================================
--- asterisk/trunk/tests/apps/macro/park_timeout_inside/configs/ast1/res_parking.conf (added)
+++ asterisk/trunk/tests/apps/macro/park_timeout_inside/configs/ast1/res_parking.conf Tue Jan 13 12:23:47 2015
@@ -1,0 +1,4 @@
+[general]
+
+[default]
+parkingtime = 3

Propchange: asterisk/trunk/tests/apps/macro/park_timeout_inside/configs/ast1/res_parking.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/apps/macro/park_timeout_inside/configs/ast1/res_parking.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/apps/macro/park_timeout_inside/configs/ast1/res_parking.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/apps/macro/park_timeout_inside/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/macro/park_timeout_inside/test-config.yaml?view=auto&rev=6268
==============================================================================
--- asterisk/trunk/tests/apps/macro/park_timeout_inside/test-config.yaml (added)
+++ asterisk/trunk/tests/apps/macro/park_timeout_inside/test-config.yaml Tue Jan 13 12:23:47 2015
@@ -1,0 +1,30 @@
+testinfo:
+    summary: 'Timeout a parked channel that is within a Macro to an exten inside the macro context'
+    description: |
+        Park a channel that is within an active Macro and have it timeout
+        to a location inside of that macro context, verify that it gets redirected
+        to the expected dialplan location.
+
+properties:
+    minversion: '13.2.0'
+    dependencies:
+        - python : 'twisted'
+        - python : 'starpy'
+        - asterisk: 'app_echo'
+        - asterisk: 'app_macro'
+        - asterisk: 'app_userevent'
+        - asterisk: 'res_parking'
+    tags:
+        - macro
+        - parking
+
+test-modules:
+    test-object:
+        config-section: test-config
+        typename: 'test_case.SimpleTestCase'
+
+test-config:
+    test-iterations:
+        -
+            channel: 'Local/s at default'
+            application: 'Echo'

Propchange: asterisk/trunk/tests/apps/macro/park_timeout_inside/test-config.yaml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/apps/macro/park_timeout_inside/test-config.yaml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/apps/macro/park_timeout_inside/test-config.yaml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/apps/macro/park_timeout_outside/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/macro/park_timeout_outside/configs/ast1/extensions.conf?view=auto&rev=6268
==============================================================================
--- asterisk/trunk/tests/apps/macro/park_timeout_outside/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/apps/macro/park_timeout_outside/configs/ast1/extensions.conf Tue Jan 13 12:23:47 2015
@@ -1,0 +1,16 @@
+[macro-park_me]
+exten => s,1,NoOp(Inside macro)
+same => n,Park(default,sc(default,park_timeout,1))
+same => n,Hangup()
+
+
+[default]
+
+exten => s,1,NoOp(Initial dialplan location)
+same => n,Macro(park_me)
+same => n,Hangup()
+
+exten => park_timeout,1,NoOp(Channel timed out of parking lot)
+same => n,UserEvent(ParkTimeout)
+same => n,Echo()
+same => n,Hangup()

Propchange: asterisk/trunk/tests/apps/macro/park_timeout_outside/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:eol-style = native

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

Propchange: asterisk/trunk/tests/apps/macro/park_timeout_outside/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/apps/macro/park_timeout_outside/configs/ast1/res_parking.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/macro/park_timeout_outside/configs/ast1/res_parking.conf?view=auto&rev=6268
==============================================================================
--- asterisk/trunk/tests/apps/macro/park_timeout_outside/configs/ast1/res_parking.conf (added)
+++ asterisk/trunk/tests/apps/macro/park_timeout_outside/configs/ast1/res_parking.conf Tue Jan 13 12:23:47 2015
@@ -1,0 +1,4 @@
+[general]
+
+[default]
+parkingtime = 3

Propchange: asterisk/trunk/tests/apps/macro/park_timeout_outside/configs/ast1/res_parking.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/apps/macro/park_timeout_outside/configs/ast1/res_parking.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/apps/macro/park_timeout_outside/configs/ast1/res_parking.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/apps/macro/park_timeout_outside/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/macro/park_timeout_outside/test-config.yaml?view=auto&rev=6268
==============================================================================
--- asterisk/trunk/tests/apps/macro/park_timeout_outside/test-config.yaml (added)
+++ asterisk/trunk/tests/apps/macro/park_timeout_outside/test-config.yaml Tue Jan 13 12:23:47 2015
@@ -1,0 +1,30 @@
+testinfo:
+    summary: 'Timeout a parked channel that is within a Macro to an exten outside the macro'
+    description: |
+        Park a channel that is within an active Macro and have it timeout
+        to a location outside of that macro, verify that it gets redirected
+        to the expected dialplan location.
+
+properties:
+    minversion: '12.0.0'
+    dependencies:
+        - python : 'twisted'
+        - python : 'starpy'
+        - asterisk: 'app_echo'
+        - asterisk: 'app_macro'
+        - asterisk: 'app_userevent'
+        - asterisk: 'res_parking'
+    tags:
+        - macro
+        - parking
+
+test-modules:
+    test-object:
+        config-section: test-config
+        typename: 'test_case.SimpleTestCase'
+
+test-config:
+    test-iterations:
+        -
+            channel: 'Local/s at default'
+            application: 'Echo'

Propchange: asterisk/trunk/tests/apps/macro/park_timeout_outside/test-config.yaml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/apps/macro/park_timeout_outside/test-config.yaml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/apps/macro/park_timeout_outside/test-config.yaml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/apps/macro/redirect_inside/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/macro/redirect_inside/configs/ast1/extensions.conf?view=auto&rev=6268
==============================================================================
--- asterisk/trunk/tests/apps/macro/redirect_inside/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/apps/macro/redirect_inside/configs/ast1/extensions.conf Tue Jan 13 12:23:47 2015
@@ -1,0 +1,19 @@
+[macro-redirect_me]
+exten => s,1,NoOp(Inside macro)
+same => n,Echo()
+same => n,Hangup()
+
+; After a redirect to here we are no longer running a Macro
+; but just executing extensions within a context.
+same => 500,NoOp(Channel redirected)
+same => n,UserEvent(Redirected)
+same => n,Echo()
+same => n,Hangup()
+
+
+[default]
+
+exten => s,1,NoOp(Initial dialplan location)
+same => n,Answer()
+same => n,Macro(redirect_me)
+same => n,Hangup()

Propchange: asterisk/trunk/tests/apps/macro/redirect_inside/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:eol-style = native

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

Propchange: asterisk/trunk/tests/apps/macro/redirect_inside/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/apps/macro/redirect_inside/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/macro/redirect_inside/test-config.yaml?view=auto&rev=6268
==============================================================================
--- asterisk/trunk/tests/apps/macro/redirect_inside/test-config.yaml (added)
+++ asterisk/trunk/tests/apps/macro/redirect_inside/test-config.yaml Tue Jan 13 12:23:47 2015
@@ -1,0 +1,75 @@
+testinfo:
+    summary: 'Redirect a channel that is within a Macro to an exten inside the macro context'
+    description: |
+        Redirect a channel that is in the Echo application within an
+        active Macro to a location inside of that macro context, verify
+        that it gets redirected to the expected dialplan location.
+
+properties:
+    minversion: ['11.16.0', '13.2.0']
+    dependencies:
+        - python : 'twisted'
+        - python : 'starpy'
+        - asterisk: 'app_echo'
+        - asterisk: 'app_macro'
+        - asterisk: 'app_userevent'
+    tags:
+        - manager
+        - macro
+
+test-modules:
+    test-object:
+        config-section: test-config
+        typename: 'test_case.SimpleTestCase'
+    modules:
+        -
+            config-section: event-action-config
+            typename: 'pluggable_modules.EventActionModule'
+
+test-config:
+    test-iterations:
+        -
+            channel: 'Local/s at default'
+            application: 'Echo'
+
+event-action-config:
+    -
+        ami-events:
+            # The Newexten event is the only event available in v11+
+            # that we can trigger on to know when we are in the Macro
+            # and about to enter the Echo application.
+            #
+            # Sending a UserEvent could work but the SimpleTestCase
+            # initiates the next call in the test-iterations list or
+            # ends the test if there are no more.  We would need some
+            # dummy 'keepalive' calls to keep the test going.
+            conditions:
+                match:
+                    Event: 'Newexten'
+                    Context: 'macro-redirect_me'
+                    # Exten: 's'
+                    # or
+                    # Extension: 's'
+                    Priority: '2'
+            requirements:
+                # For sanity this is supposed to be the priority
+                # executing the Echo application.
+                match:
+                   Application: 'Echo'
+            count: '1'
+            trigger-on-count: True
+        ami-actions:
+            # Redirect the channel to somewhere inside the macro context
+            action:
+                Action: 'Redirect'
+                Channel: 'Local/s at default-00000000;2'
+                Context: 'macro-redirect_me'
+                Exten: 's'
+                Priority: '500'
+    -
+        ami-events:
+            conditions:
+                match:
+                    Event: 'UserEvent'
+                    UserEvent: 'Redirected'
+            count: '1'

Propchange: asterisk/trunk/tests/apps/macro/redirect_inside/test-config.yaml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/apps/macro/redirect_inside/test-config.yaml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/apps/macro/redirect_inside/test-config.yaml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/apps/macro/redirect_outside/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/macro/redirect_outside/configs/ast1/extensions.conf?view=auto&rev=6268
==============================================================================
--- asterisk/trunk/tests/apps/macro/redirect_outside/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/apps/macro/redirect_outside/configs/ast1/extensions.conf Tue Jan 13 12:23:47 2015
@@ -1,0 +1,17 @@
+[macro-redirect_me]
+exten => s,1,NoOp(Inside macro)
+same => n,Echo()
+same => n,Hangup()
+
+
+[default]
+
+exten => s,1,NoOp(Initial dialplan location)
+same => n,Answer()
+same => n,Macro(redirect_me)
+same => n,Hangup()
+
+exten => redirect,1,NoOp(Channel redirected)
+same => n,UserEvent(Redirected)
+same => n,Echo()
+same => n,Hangup()

Propchange: asterisk/trunk/tests/apps/macro/redirect_outside/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:eol-style = native

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

Propchange: asterisk/trunk/tests/apps/macro/redirect_outside/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/apps/macro/redirect_outside/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/macro/redirect_outside/test-config.yaml?view=auto&rev=6268
==============================================================================
--- asterisk/trunk/tests/apps/macro/redirect_outside/test-config.yaml (added)
+++ asterisk/trunk/tests/apps/macro/redirect_outside/test-config.yaml Tue Jan 13 12:23:47 2015
@@ -1,0 +1,75 @@
+testinfo:
+    summary: 'Redirect a channel that is within a Macro to an exten outside the macro'
+    description: |
+        Redirect a channel that is in the Echo application within an
+        active Macro to a location outside of that macro, verify
+        that it gets redirected to the expected dialplan location.
+
+properties:
+    minversion: '11.0.0'
+    dependencies:
+        - python : 'twisted'
+        - python : 'starpy'
+        - asterisk: 'app_echo'
+        - asterisk: 'app_macro'
+        - asterisk: 'app_userevent'
+    tags:
+        - manager
+        - macro
+
+test-modules:
+    test-object:
+        config-section: test-config
+        typename: 'test_case.SimpleTestCase'
+    modules:
+        -
+            config-section: event-action-config
+            typename: 'pluggable_modules.EventActionModule'
+
+test-config:
+    test-iterations:
+        -
+            channel: 'Local/s at default'
+            application: 'Echo'
+
+event-action-config:
+    -
+        ami-events:
+            # The Newexten event is the only event available in v11+
+            # that we can trigger on to know when we are in the Macro
+            # and about to enter the Echo application.
+            #
+            # Sending a UserEvent could work but the SimpleTestCase
+            # initiates the next call in the test-iterations list or
+            # ends the test if there are no more.  We would need some
+            # dummy 'keepalive' calls to keep the test going.
+            conditions:
+                match:
+                    Event: 'Newexten'
+                    Context: 'macro-redirect_me'
+                    # Exten: 's'
+                    # or
+                    # Extension: 's'
+                    Priority: '2'
+            requirements:
+                # For sanity this is supposed to be the priority
+                # executing the Echo application.
+                match:
+                   Application: 'Echo'
+            count: '1'
+            trigger-on-count: True
+        ami-actions:
+            # Redirect the channel to somewhere outside the macro
+            action:
+                Action: 'Redirect'
+                Channel: 'Local/s at default-00000000;2'
+                Context: 'default'
+                Exten: 'redirect'
+                Priority: '1'
+    -
+        ami-events:
+            conditions:
+                match:
+                    Event: 'UserEvent'
+                    UserEvent: 'Redirected'
+            count: '1'

Propchange: asterisk/trunk/tests/apps/macro/redirect_outside/test-config.yaml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/apps/macro/redirect_outside/test-config.yaml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/apps/macro/redirect_outside/test-config.yaml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/apps/macro/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/macro/tests.yaml?view=auto&rev=6268
==============================================================================
--- asterisk/trunk/tests/apps/macro/tests.yaml (added)
+++ asterisk/trunk/tests/apps/macro/tests.yaml Tue Jan 13 12:23:47 2015
@@ -1,0 +1,6 @@
+# Enter tests here in the order they should be considered for execution:
+tests:
+    - test: 'park_timeout_inside'
+    - test: 'park_timeout_outside'
+    - test: 'redirect_inside'
+    - test: 'redirect_outside'

Propchange: asterisk/trunk/tests/apps/macro/tests.yaml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/apps/macro/tests.yaml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/apps/macro/tests.yaml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: asterisk/trunk/tests/apps/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/tests.yaml?view=diff&rev=6268&r1=6267&r2=6268
==============================================================================
--- asterisk/trunk/tests/apps/tests.yaml (original)
+++ asterisk/trunk/tests/apps/tests.yaml Tue Jan 13 12:23:47 2015
@@ -11,6 +11,7 @@
     - dir: 'chanspy'
     - dir: 'queues'
     - dir: 'directed_pickup'
+    - dir: 'macro'
     - test: 'mixmonitor'
     - test: 'mixmonitor_audiohook_inherit'
     - test: 'mixmonitor_func'




More information about the svn-commits mailing list