[asterisk-commits] mjordan: testsuite/asterisk/trunk r3739 - in /asterisk/trunk/tests/dialplan: ...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu May 2 14:08:26 CDT 2013


Author: mjordan
Date: Thu May  2 14:08:24 2013
New Revision: 3739

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=3739
Log:
Turn the dialplan test into a pluggable module test

Since this spawns a Local channel and runs a slew of dialplan related
tests, it's simpler to have it be managed by the SimpleTestCase class

Modified:
    asterisk/trunk/tests/dialplan/configs/ast1/extensions.conf
    asterisk/trunk/tests/dialplan/test-config.yaml

Modified: asterisk/trunk/tests/dialplan/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/dialplan/configs/ast1/extensions.conf?view=diff&rev=3739&r1=3738&r2=3739
==============================================================================
--- asterisk/trunk/tests/dialplan/configs/ast1/extensions.conf (original)
+++ asterisk/trunk/tests/dialplan/configs/ast1/extensions.conf Thu May  2 14:08:24 2013
@@ -76,18 +76,18 @@
 	same => n,Goto(result_pass,1)
 
 exten => result_pass,1,NoOp()
-	same => n,UserEvent(TestResult,result: Success)
+	same => n,UserEvent(TestResult,Result: Success)
 	same => n,Set(ResultSent=OK)
 	same => n,Hangup()
 
 exten => result_fail,1,NoOp()
-	same => n,UserEvent(TestResult,result: Fail,message: Test ${TestCounter} failed.)
+	same => n,UserEvent(TestResult,Result: Fail,message: Test ${TestCounter} failed.)
 	same => n,Set(ResultSent=OK)
 	same => n,Hangup()
 
 exten => h,1,NoOp()
 	same => n,GotoIf($[${ResultSent} = OK]?done)
-	same => n,UserEvent(TestResult,result: Fail,message: Unexpected hangup on test ${TestCounter}.)
+	same => n,UserEvent(TestResult,Result: Fail,message: Unexpected hangup on test ${TestCounter}.)
 	same => n(done),NoOp()
 
 ; ---------------------------------------------------------------

Modified: asterisk/trunk/tests/dialplan/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/dialplan/test-config.yaml?view=diff&rev=3739&r1=3738&r2=3739
==============================================================================
--- asterisk/trunk/tests/dialplan/test-config.yaml (original)
+++ asterisk/trunk/tests/dialplan/test-config.yaml Thu May  2 14:08:24 2013
@@ -4,6 +4,37 @@
         This test verifies a number of dialplan specific functions and features.  This includes,
         but is not limited to, pattern matching, Goto, GotoIf, math functions, string functions,
         looping, etc.
+
+test-modules:
+    test-object:
+        config-section: test-config
+        typename: 'SimpleTestCase.SimpleTestCase'
+    modules:
+      -
+        config-section: 'ami-config'
+        typename: 'ami.AMIEventModule'
+
+test-config:
+  spawn-after-hangup: True
+  expected_events: 0
+  test-iterations:
+    -
+      channel: 'Local/s at DialContext'
+      context: 'test'
+      exten: 's'
+      priority: '1'
+
+ami-config:
+  -
+    type: 'headermatch'
+    conditions:
+      match:
+          Event: 'UserEvent'
+          UserEvent: 'TestResult'
+    requirements:
+      match:
+          Result: 'Success'
+    count: '>1'
 
 properties:
     minversion: '1.8.20.0'




More information about the asterisk-commits mailing list