[svn-commits] mjordan: testsuite/asterisk/trunk r5514 - in /asterisk/trunk/tests/apps/contr...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Fri Aug 22 12:08:08 CDT 2014
Author: mjordan
Date: Fri Aug 22 12:08:05 2014
New Revision: 5514
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=5514
Log:
tests/apps/control_playback: Fix tests
This patch fixes two problems with the tests:
(1) With the patch that removes the implicit answer in ControlPlayback, the
originates will now fail if the channel is not answered. This didn't
cause the tests to fail, but does create a lot of origination spam.
(2) The queueing up of the AMI action that controls the playback was done
rather optimistically. This is now done once we know for sure that the
sound file is being played back via a TestEvent.
Modified:
asterisk/trunk/tests/apps/control_playback/control_forward/configs/ast1/extensions.conf
asterisk/trunk/tests/apps/control_playback/control_forward/test-config.yaml
asterisk/trunk/tests/apps/control_playback/control_pause/configs/ast1/extensions.conf
asterisk/trunk/tests/apps/control_playback/control_pause/test-config.yaml
asterisk/trunk/tests/apps/control_playback/control_restart/configs/ast1/extensions.conf
asterisk/trunk/tests/apps/control_playback/control_restart/test-config.yaml
asterisk/trunk/tests/apps/control_playback/control_reverse/configs/ast1/extensions.conf
asterisk/trunk/tests/apps/control_playback/control_reverse/test-config.yaml
asterisk/trunk/tests/apps/control_playback/control_stop/configs/ast1/extensions.conf
asterisk/trunk/tests/apps/control_playback/control_stop/test-config.yaml
asterisk/trunk/tests/apps/control_playback/nominal/configs/ast1/extensions.conf
Modified: asterisk/trunk/tests/apps/control_playback/control_forward/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/control_playback/control_forward/configs/ast1/extensions.conf?view=diff&rev=5514&r1=5513&r2=5514
==============================================================================
--- asterisk/trunk/tests/apps/control_playback/control_forward/configs/ast1/extensions.conf (original)
+++ asterisk/trunk/tests/apps/control_playback/control_forward/configs/ast1/extensions.conf Fri Aug 22 12:08:05 2014
@@ -2,6 +2,7 @@
exten => test_user,1,NoOp()
; Use DTMF 1 to FF 5 seconds
+ same => n,Answer()
same => n,ControlPlayback(tt-monkeys,5000,1)
same => n,ExecIf($[${CPLAYBACKOFFSET}=-1]?UserEvent(TestResult,result:pass_eof)
same => n,ExecIf($[${CPLAYBACKSTATUS}=SUCCESS]?UserEvent(TestResult,result:pass_user)
@@ -9,6 +10,7 @@
exten => test_default_user,1,NoOp()
; Test default skipms of 3000; default FF of #
+ same => n,Answer()
same => n,ControlPlayback(tt-monkeys)
same => n,ExecIf($[${CPLAYBACKOFFSET}=-1]?UserEvent(TestResult,result:pass_default_eof)
same => n,ExecIf($[${CPLAYBACKSTATUS}=SUCCESS]?UserEvent(TestResult,result:pass_default_user)
@@ -16,6 +18,7 @@
exten => test_remote,1,NoOp()
; Remote AMI connection controls test
+ same => n,Answer()
same => n,ControlPlayback(tt-monkeys)
same => n,ExecIf($[${CPLAYBACKOFFSET}=-1]?UserEvent(TestResult,result:pass_remote_eof)
same => n,ExecIf($[${CPLAYBACKSTATUS}=SUCCESS]?UserEvent(TestResult,result:pass_remote)
Modified: asterisk/trunk/tests/apps/control_playback/control_forward/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/control_playback/control_forward/test-config.yaml?view=diff&rev=5514&r1=5513&r2=5514
==============================================================================
--- asterisk/trunk/tests/apps/control_playback/control_forward/test-config.yaml (original)
+++ asterisk/trunk/tests/apps/control_playback/control_forward/test-config.yaml Fri Aug 22 12:08:05 2014
@@ -167,9 +167,9 @@
type: 'headermatch'
conditions:
match:
- Event: 'Newexten'
- Context: 'default'
- Extension: 'wait'
+ Event: 'TestEvent'
+ State: 'PLAYBACK'
+ Message: 'tt-monkeys'
actions:
-
action-type: 'send-ami-message'
Modified: asterisk/trunk/tests/apps/control_playback/control_pause/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/control_playback/control_pause/configs/ast1/extensions.conf?view=diff&rev=5514&r1=5513&r2=5514
==============================================================================
--- asterisk/trunk/tests/apps/control_playback/control_pause/configs/ast1/extensions.conf (original)
+++ asterisk/trunk/tests/apps/control_playback/control_pause/configs/ast1/extensions.conf Fri Aug 22 12:08:05 2014
@@ -2,6 +2,7 @@
exten => test_user,1,NoOp()
; Use DTMF 3 to pause playback
+ same => n,Answer()
same => n,ControlPlayback(tt-monkeys,,,,,3)
same => n,ExecIf($[${CPLAYBACKOFFSET}=-1]?UserEvent(TestResult,result:pass_eof)
same => n,ExecIf($[${CPLAYBACKSTATUS}=SUCCESS]?UserEvent(TestResult,result:pass_user)
@@ -9,6 +10,7 @@
exten => test_remote,1,NoOp()
; Remote AMI connection controls test
+ same => n,Answer()
same => n,ControlPlayback(tt-monkeys)
same => n,ExecIf($[${CPLAYBACKOFFSET}=-1]?UserEvent(TestResult,result:pass_remote_eof)
same => n,ExecIf($[${CPLAYBACKSTATUS}=SUCCESS]?UserEvent(TestResult,result:pass_remote)
Modified: asterisk/trunk/tests/apps/control_playback/control_pause/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/control_playback/control_pause/test-config.yaml?view=diff&rev=5514&r1=5513&r2=5514
==============================================================================
--- asterisk/trunk/tests/apps/control_playback/control_pause/test-config.yaml (original)
+++ asterisk/trunk/tests/apps/control_playback/control_pause/test-config.yaml Fri Aug 22 12:08:05 2014
@@ -113,9 +113,9 @@
type: 'headermatch'
conditions:
match:
- Event: 'Newexten'
- Context: 'default'
- Extension: 'wait'
+ Event: 'TestEvent'
+ State: 'PLAYBACK'
+ Message: 'tt-monkeys'
actions:
-
action-type: 'send-ami-message'
Modified: asterisk/trunk/tests/apps/control_playback/control_restart/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/control_playback/control_restart/configs/ast1/extensions.conf?view=diff&rev=5514&r1=5513&r2=5514
==============================================================================
--- asterisk/trunk/tests/apps/control_playback/control_restart/configs/ast1/extensions.conf (original)
+++ asterisk/trunk/tests/apps/control_playback/control_restart/configs/ast1/extensions.conf Fri Aug 22 12:08:05 2014
@@ -2,6 +2,7 @@
exten => test_user,1,NoOp()
; Use DTMF 8 to restart playback
+ same => n,Answer()
same => n,ControlPlayback(tt-monkeys,,,,,,8)
same => n,ExecIf($[${CPLAYBACKOFFSET}=-1]?UserEvent(TestResult,result:pass_eof)
same => n,ExecIf($[${CPLAYBACKSTATUS}=SUCCESS]?UserEvent(TestResult,result:pass_user)
@@ -9,6 +10,7 @@
exten => test_remote,1,NoOp()
; Remote AMI connection controls test
+ same => n,Answer()
same => n,ControlPlayback(tt-monkeys)
same => n,ExecIf($[${CPLAYBACKOFFSET}=-1]?UserEvent(TestResult,result:pass_remote_eof)
same => n,ExecIf($[${CPLAYBACKSTATUS}=SUCCESS]?UserEvent(TestResult,result:pass_remote)
Modified: asterisk/trunk/tests/apps/control_playback/control_restart/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/control_playback/control_restart/test-config.yaml?view=diff&rev=5514&r1=5513&r2=5514
==============================================================================
--- asterisk/trunk/tests/apps/control_playback/control_restart/test-config.yaml (original)
+++ asterisk/trunk/tests/apps/control_playback/control_restart/test-config.yaml Fri Aug 22 12:08:05 2014
@@ -97,9 +97,9 @@
type: 'headermatch'
conditions:
match:
- Event: 'Newexten'
- Context: 'default'
- Extension: 'wait'
+ Event: 'TestEvent'
+ State: 'PLAYBACK'
+ Message: 'tt-monkeys'
actions:
-
action-type: 'send-ami-message'
Modified: asterisk/trunk/tests/apps/control_playback/control_reverse/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/control_playback/control_reverse/configs/ast1/extensions.conf?view=diff&rev=5514&r1=5513&r2=5514
==============================================================================
--- asterisk/trunk/tests/apps/control_playback/control_reverse/configs/ast1/extensions.conf (original)
+++ asterisk/trunk/tests/apps/control_playback/control_reverse/configs/ast1/extensions.conf Fri Aug 22 12:08:05 2014
@@ -2,6 +2,7 @@
exten => test_user,1,NoOp()
; Use DTMF 1 to Rewind 5 seconds
+ same => n,Answer()
same => n,ControlPlayback(tt-monkeys,5000,,1)
same => n,ExecIf($[${CPLAYBACKOFFSET}=-1]?UserEvent(TestResult,result:pass_eof)
same => n,ExecIf($[${CPLAYBACKSTATUS}=SUCCESS]?UserEvent(TestResult,result:pass_user)
@@ -9,6 +10,7 @@
exten => test_default_user,1,NoOp()
; Test default skipms of 3000; default Rewind of *
+ same => n,Answer()
same => n,ControlPlayback(tt-monkeys)
same => n,ExecIf($[${CPLAYBACKOFFSET}=-1]?UserEvent(TestResult,result:pass_default_eof)
same => n,ExecIf($[${CPLAYBACKSTATUS}=SUCCESS]?UserEvent(TestResult,result:pass_default_user)
@@ -16,6 +18,7 @@
exten => test_remote,1,NoOp()
; Remote AMI connection controls test
+ same => n,Answer()
same => n,ControlPlayback(tt-monkeys)
same => n,ExecIf($[${CPLAYBACKOFFSET}=-1]?UserEvent(TestResult,result:pass_remote_eof)
same => n,ExecIf($[${CPLAYBACKSTATUS}=SUCCESS]?UserEvent(TestResult,result:pass_remote)
Modified: asterisk/trunk/tests/apps/control_playback/control_reverse/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/control_playback/control_reverse/test-config.yaml?view=diff&rev=5514&r1=5513&r2=5514
==============================================================================
--- asterisk/trunk/tests/apps/control_playback/control_reverse/test-config.yaml (original)
+++ asterisk/trunk/tests/apps/control_playback/control_reverse/test-config.yaml Fri Aug 22 12:08:05 2014
@@ -167,9 +167,9 @@
type: 'headermatch'
conditions:
match:
- Event: 'Newexten'
- Context: 'default'
- Extension: 'wait'
+ Event: 'TestEvent'
+ State: 'PLAYBACK'
+ Message: 'tt-monkeys'
actions:
-
action-type: 'send-ami-message'
Modified: asterisk/trunk/tests/apps/control_playback/control_stop/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/control_playback/control_stop/configs/ast1/extensions.conf?view=diff&rev=5514&r1=5513&r2=5514
==============================================================================
--- asterisk/trunk/tests/apps/control_playback/control_stop/configs/ast1/extensions.conf (original)
+++ asterisk/trunk/tests/apps/control_playback/control_stop/configs/ast1/extensions.conf Fri Aug 22 12:08:05 2014
@@ -2,6 +2,7 @@
exten => test_user,1,NoOp()
; Use DTMF 0 to stop
+ same => n,Answer()
same => n,ControlPlayback(tt-monkeys,,,,0)
same => n,ExecIf($[${CPLAYBACKOFFSET}!=-1]?UserEvent(TestResult,result:pass_eof)
same => n,ExecIf($[${CPLAYBACKSTATUS}=USERSTOPPED]?UserEvent(TestResult,result:pass_user)
@@ -10,6 +11,7 @@
exten => test_remote,1,NoOp()
; Remote AMI connection stops test
+ same => n,Answer()
same => n,ControlPlayback(tt-monkeys)
same => n,ExecIf($[${CPLAYBACKOFFSET}!=-1]?UserEvent(TestResult,result:pass_remote_eof)
same => n,ExecIf($[${CPLAYBACKSTATUS}=REMOTESTOPPED]?UserEvent(TestResult,result:pass_remote)
Modified: asterisk/trunk/tests/apps/control_playback/control_stop/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/control_playback/control_stop/test-config.yaml?view=diff&rev=5514&r1=5513&r2=5514
==============================================================================
--- asterisk/trunk/tests/apps/control_playback/control_stop/test-config.yaml (original)
+++ asterisk/trunk/tests/apps/control_playback/control_stop/test-config.yaml Fri Aug 22 12:08:05 2014
@@ -108,9 +108,9 @@
type: 'headermatch'
conditions:
match:
- Event: 'Newexten'
- Context: 'default'
- Extension: 'wait'
+ Event: 'TestEvent'
+ State: 'PLAYBACK'
+ Message: 'tt-monkeys'
actions:
-
action-type: 'send-ami-message'
Modified: asterisk/trunk/tests/apps/control_playback/nominal/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/control_playback/nominal/configs/ast1/extensions.conf?view=diff&rev=5514&r1=5513&r2=5514
==============================================================================
--- asterisk/trunk/tests/apps/control_playback/nominal/configs/ast1/extensions.conf (original)
+++ asterisk/trunk/tests/apps/control_playback/nominal/configs/ast1/extensions.conf Fri Aug 22 12:08:05 2014
@@ -1,6 +1,7 @@
[default]
exten => test,1,NoOp()
+ same => n,Answer()
same => n,ControlPlayback(tt-monkeys)
same => n,ExecIf($[${CPLAYBACKOFFSET}=-1]?UserEvent(Offset,result:offset_pass)
same => n,ExecIf($[${CPLAYBACKSTATUS}=SUCCESS]?UserEvent(Status,result:status_pass)
More information about the svn-commits
mailing list