[asterisk-commits] mjordan: testsuite/asterisk/trunk r4668 - in /asterisk/trunk/tests/apps/dial:...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Feb 4 12:07:37 CST 2014


Author: mjordan
Date: Tue Feb  4 12:07:34 2014
New Revision: 4668

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4668
Log:
dial tests: Fix tests for versions less than Asterisk 12

The tests modified by this commit made some improper assumptions about the
formatting and presence of the UserEvent events they were testing. It also
made som incorrect assumptions about the presence of pre-dial handlers,
which weren't added until version 11.

This patch fixes the assumptions such that the tests will run under the
oldest version of Asterisk possible for the test.

Modified:
    asterisk/trunk/tests/apps/dial/action_post_answer/called_party_continue/test-config.yaml
    asterisk/trunk/tests/apps/dial/action_post_answer/caller_continue/test-config.yaml
    asterisk/trunk/tests/apps/dial/action_post_answer/party_transfer/configs/ast1/extensions.conf
    asterisk/trunk/tests/apps/dial/action_post_answer/party_transfer/test-config.yaml
    asterisk/trunk/tests/apps/dial/peer_h_exten/test-config.yaml

Modified: asterisk/trunk/tests/apps/dial/action_post_answer/called_party_continue/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/dial/action_post_answer/called_party_continue/test-config.yaml?view=diff&rev=4668&r1=4667&r2=4668
==============================================================================
--- asterisk/trunk/tests/apps/dial/action_post_answer/called_party_continue/test-config.yaml (original)
+++ asterisk/trunk/tests/apps/dial/action_post_answer/called_party_continue/test-config.yaml Tue Feb  4 12:07:34 2014
@@ -15,7 +15,12 @@
         typename: 'test_case.SimpleTestCase'
     modules:
       -
-        config-section: 'ami-config'
+        config-section: 'ami-config-pre-12'
+        maxversion: '12.0.0'
+        typename: 'ami.AMIEventModule'
+      -
+        config-section: 'ami-config-12'
+        minversion: '12.0.0'
         typename: 'ami.AMIEventModule'
       -
         minversion: '12.0.0'
@@ -38,7 +43,19 @@
       exten: 'target'
       priority: '1'
 
-ami-config:
+ami-config-pre-12:
+  -
+    type: 'headermatch'
+    conditions:
+      match:
+          Event: 'UserEvent'
+          UserEvent: 'Continue'
+    requirements:
+      match:
+          result: 'passed'
+    count: '2'
+
+ami-config-12:
   -
     type: 'headermatch'
     conditions:

Modified: asterisk/trunk/tests/apps/dial/action_post_answer/caller_continue/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/dial/action_post_answer/caller_continue/test-config.yaml?view=diff&rev=4668&r1=4667&r2=4668
==============================================================================
--- asterisk/trunk/tests/apps/dial/action_post_answer/caller_continue/test-config.yaml (original)
+++ asterisk/trunk/tests/apps/dial/action_post_answer/caller_continue/test-config.yaml Tue Feb  4 12:07:34 2014
@@ -11,7 +11,12 @@
         typename: 'test_case.SimpleTestCase'
     modules:
       -
-        config-section: 'ami-config'
+        config-section: 'ami-config-pre-12'
+        maxversion: '12.0.0'
+        typename: 'ami.AMIEventModule'
+      -
+        config-section: 'ami-config-12'
+        minversion: '12.0.0'
         typename: 'ami.AMIEventModule'
       -
         minversion: '12.0.0'
@@ -30,7 +35,19 @@
       exten: 'target'
       priority: '1'
 
-ami-config:
+ami-config-pre-12:
+  -
+    type: 'headermatch'
+    conditions:
+      match:
+          Event: 'UserEvent'
+          UserEvent: 'Continue'
+    requirements:
+      match:
+          result: 'passed'
+    count: '1'
+
+ami-config-12:
   -
     type: 'headermatch'
     conditions:
@@ -70,7 +87,7 @@
 
 
 properties:
-    minversion: '1.8.0.0'
+    minversion: '11.0.0'
     dependencies:
         - python : 'twisted'
         - python : 'starpy'

Modified: asterisk/trunk/tests/apps/dial/action_post_answer/party_transfer/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/dial/action_post_answer/party_transfer/configs/ast1/extensions.conf?view=diff&rev=4668&r1=4667&r2=4668
==============================================================================
--- asterisk/trunk/tests/apps/dial/action_post_answer/party_transfer/configs/ast1/extensions.conf (original)
+++ asterisk/trunk/tests/apps/dial/action_post_answer/party_transfer/configs/ast1/extensions.conf Tue Feb  4 12:07:34 2014
@@ -15,17 +15,17 @@
 
 exten => jump,1,Goto(jump_caller,1)
  same => n,Goto(jump_callee,1)
- same => n,UserEvent(Jump, result: failed)
+ same => n,UserEvent(Jump,result: failed)
  same => n,Hangup()
 
 exten => jump_caller,1,NoOp()
  same => n,Answer()
  same => n,Wait(2)
- same => n,UserEvent(Jump, result: passed)
+ same => n,UserEvent(Jump,result: passed)
  same => n,Hangup()
 
 exten => jump_callee,1,NoOp()
  same => n,Answer()
  same => n,Wait(1)
- same => n,UserEvent(Jump, result: passed)
+ same => n,UserEvent(Jump,result: passed)
  same => n,Hangup()

Modified: asterisk/trunk/tests/apps/dial/action_post_answer/party_transfer/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/dial/action_post_answer/party_transfer/test-config.yaml?view=diff&rev=4668&r1=4667&r2=4668
==============================================================================
--- asterisk/trunk/tests/apps/dial/action_post_answer/party_transfer/test-config.yaml (original)
+++ asterisk/trunk/tests/apps/dial/action_post_answer/party_transfer/test-config.yaml Tue Feb  4 12:07:34 2014
@@ -14,7 +14,12 @@
         typename: 'test_case.SimpleTestCase'
     modules:
       -
-        config-section: 'ami-config'
+        config-section: 'ami-config-pre-12'
+        maxversion: '12.0.0'
+        typename: 'ami.AMIEventModule'
+      -
+        config-section: 'ami-config-12'
+        minversion: '12.0.0'
         typename: 'ami.AMIEventModule'
       -
         minversion: '12.0.0'
@@ -32,7 +37,19 @@
       exten: 'target'
       priority: '1'
 
-ami-config:
+ami-config-pre-12:
+  -
+    type: 'headermatch'
+    conditions:
+      match:
+          Event: 'UserEvent'
+          UserEvent: 'Jump'
+    requirements:
+      match:
+          result: 'passed'
+    count: '2'
+
+ami-config-12:
   -
     type: 'headermatch'
     conditions:

Modified: asterisk/trunk/tests/apps/dial/peer_h_exten/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/dial/peer_h_exten/test-config.yaml?view=diff&rev=4668&r1=4667&r2=4668
==============================================================================
--- asterisk/trunk/tests/apps/dial/peer_h_exten/test-config.yaml (original)
+++ asterisk/trunk/tests/apps/dial/peer_h_exten/test-config.yaml Tue Feb  4 12:07:34 2014
@@ -11,7 +11,12 @@
         typename: 'test_case.SimpleTestCase'
     modules:
       -
-        config-section: 'ami-config'
+        config-section: 'ami-config-pre-12'
+        maxversion: '12.0.0'
+        typename: 'ami.AMIEventModule'
+      -
+        config-section: 'ami-config-12'
+        minversion: '12.0.0'
         typename: 'ami.AMIEventModule'
       -
         minversion: '12.0.0'
@@ -29,7 +34,19 @@
       exten: 'target'
       priority: '1'
 
-ami-config:
+ami-config-pre-12:
+  -
+    type: 'headermatch'
+    conditions:
+      match:
+          Event: 'UserEvent'
+          UserEvent: 'HangupCheck'
+    requirements:
+      match:
+          result: 'passed'
+    count: '4'
+
+ami-config-12:
   -
     type: 'headermatch'
     conditions:




More information about the asterisk-commits mailing list