[asterisk-commits] mjordan: testsuite/asterisk/trunk r5790 - /asterisk/trunk/tests/funcs/func_push/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Oct 26 21:17:02 CDT 2014


Author: mjordan
Date: Sun Oct 26 21:16:56 2014
New Revision: 5790

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=5790
Log:
tests/funcs/func_push: Update test for Asterisk 1.8/11

Variable inheritance will only raise the expected events in 12+. This patch
updates the test to only look for those events in those versions.

Modified:
    asterisk/trunk/tests/funcs/func_push/test-config.yaml

Modified: asterisk/trunk/tests/funcs/func_push/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/funcs/func_push/test-config.yaml?view=diff&rev=5790&r1=5789&r2=5790
==============================================================================
--- asterisk/trunk/tests/funcs/func_push/test-config.yaml (original)
+++ asterisk/trunk/tests/funcs/func_push/test-config.yaml Sun Oct 26 21:16:56 2014
@@ -20,6 +20,10 @@
         -
             config-section: ami-config
             typename: 'ami.AMIEventModule'
+        -
+            config-section: ami-config-12
+            typename: 'ami.AMIEventModule'
+            minversion: '12.0.0'
 
 test-case-config:
     connect-ami: 'True'
@@ -29,6 +33,60 @@
 
 originator-config:
     trigger: 'ami_connect'
+
+ami-config-12:
+    -
+        type: 'orderedheadermatch'
+        conditions:
+            match:
+                Event: 'VarSet'
+                Variable: '__INHERIT_PUSH'
+                Channel: 'Local/s at default-.*'
+        requirements:
+            -
+                match:
+                    Value: 'yes'
+            -
+                match:
+                    Value: 'yes,please'
+        count: '2'
+    -
+        type: 'headermatch'
+        conditions:
+            match:
+                Event: 'VarSet'
+                Variable: '__INHERIT_PUSH'
+                Channel: 'Local/dest at default-.*'
+        requirements:
+            match:
+                Value: 'yes,please'
+        count: '2'
+    -
+        type: 'orderedheadermatch'
+        conditions:
+            match:
+                Event: 'VarSet'
+                Variable: '__INHERIT_UNSHIFT'
+                Channel: 'Local/s at default-.*'
+        requirements:
+            -
+                match:
+                    Value: 'please'
+            -
+                match:
+                    Value: 'yes,please'
+        count: '2'
+    -
+        type: 'headermatch'
+        conditions:
+            match:
+                Event: 'VarSet'
+                Variable: '__INHERIT_UNSHIFT'
+                Channel: 'Local/dest at default-.*'
+        requirements:
+            match:
+                Value: 'yes,please'
+        count: '2'
 
 ami-config:
     -
@@ -50,35 +108,7 @@
         conditions:
             match:
                 Event: 'VarSet'
-                Variable: '__INHERIT_PUSH'
-        requirements:
-            -
-                match:
-                    Value: 'yes'
-            -
-                match:
-                    Value: 'yes,please'
-        count: '2'
-    -
-        type: 'orderedheadermatch'
-        conditions:
-            match:
-                Event: 'VarSet'
                 Variable: 'REGULAR_UNSHIFT'
-        requirements:
-            -
-                match:
-                    Value: 'please'
-            -
-                match:
-                    Value: 'yes,please'
-        count: '2'
-    -
-        type: 'orderedheadermatch'
-        conditions:
-            match:
-                Event: 'VarSet'
-                Variable: '__INHERIT_UNSHIFT'
         requirements:
             -
                 match:
@@ -111,150 +141,8 @@
 
 properties:
     minversion: '1.8.29.0'
-    minvserion: '11.11.0'
-    minversion: '12.4.0'
     dependencies:
         - python: 'twisted'
         - python: 'starpy'
         - asterisk: 'func_strings'
-testinfo:
-    summary: 'Tests the PUSH and UNSHIFT dialplan functions, ensuring the inheritable variables are evaluated properly'
-    description: |
-        "This test ensures that the PUSH and UNSHIFT functions correctly append and
-        prepend strings to a variable. The test performs this on both regular variables
-        as well as inheritable variables. With the inheritable variables, we also
-        ensure that the variable values are inherited as expected."
 
-test-modules:
-    test-object:
-        config-section: test-case-config
-        typename: 'test_case.TestCaseModule'
-    modules:
-        -
-            config-section: originator-config
-            typename: 'pluggable_modules.Originator'
-        -
-            config-section: hangup-config
-            typename: 'pluggable_modules.HangupMonitor'
-        -
-            config-section: ami-config
-            typename: 'ami.AMIEventModule'
-
-test-case-config:
-    connect-ami: 'True'
-
-hangup-config:
-    ids: ['0']
-
-originator-config:
-    trigger: 'ami_connect'
-
-ami-config:
-    -
-        type: 'orderedheadermatch'
-        conditions:
-            match:
-                Event: 'VarSet'
-                Variable: 'REGULAR_PUSH'
-        requirements:
-            -
-                match:
-                    Value: 'yes'
-            -
-                match:
-                    Value: 'yes,please'
-        count: '2'
-    -
-        type: 'orderedheadermatch'
-        conditions:
-            match:
-                Event: 'VarSet'
-                Variable: '__INHERIT_PUSH'
-                Channel: 'Local/s at default-.*'
-        requirements:
-            -
-                match:
-                    Value: 'yes'
-            -
-                match:
-                    Value: 'yes,please'
-        count: '2'
-    -
-        type: 'headermatch'
-        conditions:
-            match:
-                Event: 'VarSet'
-                Variable: '__INHERIT_PUSH'
-                Channel: 'Local/dest at default-.*'
-        requirements:
-            match:
-                Value: 'yes,please'
-        count: '2'
-    -
-        type: 'orderedheadermatch'
-        conditions:
-            match:
-                Event: 'VarSet'
-                Variable: 'REGULAR_UNSHIFT'
-        requirements:
-            -
-                match:
-                    Value: 'please'
-            -
-                match:
-                    Value: 'yes,please'
-        count: '2'
-    -
-        type: 'orderedheadermatch'
-        conditions:
-            match:
-                Event: 'VarSet'
-                Variable: '__INHERIT_UNSHIFT'
-                Channel: 'Local/s at default-.*'
-        requirements:
-            -
-                match:
-                    Value: 'please'
-            -
-                match:
-                    Value: 'yes,please'
-        count: '2'
-    -
-        type: 'headermatch'
-        conditions:
-            match:
-                Event: 'VarSet'
-                Variable: '__INHERIT_UNSHIFT'
-                Channel: 'Local/dest at default-.*'
-        requirements:
-            match:
-                Value: 'yes,please'
-        count: '2'
-    -
-        type: 'headermatch'
-        conditions:
-            match:
-                Event: 'UserEvent'
-                UserEvent: 'PushInheritance'
-        requirements:
-            match:
-                result: 'pass'
-        count: '1'
-    -
-        type: 'headermatch'
-        conditions:
-            match:
-                Event: 'UserEvent'
-                UserEvent: 'UnshiftInheritance'
-        requirements:
-            match:
-                result: 'pass'
-        count: '1'
-
-
-properties:
-    minversion: '1.8.29.0'
-    dependencies:
-        - python: 'twisted'
-        - python: 'starpy'
-        - asterisk: 'func_strings'




More information about the asterisk-commits mailing list