[asterisk-commits] kmoore: testsuite/asterisk/trunk r5043 - in /asterisk/trunk/tests/pbx: ./ cal...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu May 15 13:11:36 CDT 2014
Author: kmoore
Date: Thu May 15 13:11:29 2014
New Revision: 5043
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=5043
Log:
Testsuite: Add call files retries tests
This adds four tests dealing with retrying origination via call files.
One test checks the AlwaysDelete flag, one checks the Archive flag, one
checks that the maximum number of retries is obeyed, and the last
checks that a call file can succeed after a failure.
(closes issue ASTERISK-23218)
Review: https://reviewboard.asterisk.org/r/3420/
Patch by: Scott Emidy
Added:
asterisk/trunk/tests/pbx/call_file_retries_alwaysdelete/
asterisk/trunk/tests/pbx/call_file_retries_alwaysdelete/configs/
asterisk/trunk/tests/pbx/call_file_retries_alwaysdelete/configs/ast1/
asterisk/trunk/tests/pbx/call_file_retries_alwaysdelete/configs/ast1/extensions.conf (with props)
asterisk/trunk/tests/pbx/call_file_retries_alwaysdelete/retries_alwaysdelete.py (with props)
asterisk/trunk/tests/pbx/call_file_retries_alwaysdelete/test-config.yaml (with props)
asterisk/trunk/tests/pbx/call_file_retries_archive/
asterisk/trunk/tests/pbx/call_file_retries_archive/configs/
asterisk/trunk/tests/pbx/call_file_retries_archive/configs/ast1/
asterisk/trunk/tests/pbx/call_file_retries_archive/configs/ast1/extensions.conf (with props)
asterisk/trunk/tests/pbx/call_file_retries_archive/retries_archive.py (with props)
asterisk/trunk/tests/pbx/call_file_retries_archive/test-config.yaml (with props)
asterisk/trunk/tests/pbx/call_file_retries_fail/
asterisk/trunk/tests/pbx/call_file_retries_fail/configs/
asterisk/trunk/tests/pbx/call_file_retries_fail/configs/ast1/
asterisk/trunk/tests/pbx/call_file_retries_fail/configs/ast1/extensions.conf (with props)
asterisk/trunk/tests/pbx/call_file_retries_fail/test-config.yaml (with props)
asterisk/trunk/tests/pbx/call_file_retries_success/
asterisk/trunk/tests/pbx/call_file_retries_success/configs/
asterisk/trunk/tests/pbx/call_file_retries_success/configs/ast1/
asterisk/trunk/tests/pbx/call_file_retries_success/configs/ast1/extensions.conf (with props)
asterisk/trunk/tests/pbx/call_file_retries_success/test-config.yaml (with props)
Modified:
asterisk/trunk/tests/pbx/tests.yaml
Added: asterisk/trunk/tests/pbx/call_file_retries_alwaysdelete/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/pbx/call_file_retries_alwaysdelete/configs/ast1/extensions.conf?view=auto&rev=5043
==============================================================================
--- asterisk/trunk/tests/pbx/call_file_retries_alwaysdelete/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/pbx/call_file_retries_alwaysdelete/configs/ast1/extensions.conf Thu May 15 13:11:29 2014
@@ -1,0 +1,19 @@
+
+[globals]
+
+TESTCOUNTER=0
+
+[test_keep]
+
+exten => store,1,Goto(test_end,end_keep,1)
+
+[test_end]
+
+exten => end_keep,1,NoOp()
+ same => n,Set(GLOBAL(TESTCOUNTER)=$[ ${GLOBAL(TESTCOUNTER)} + 1 ])
+ same => n,ExecIf($[ "${GLOBAL(TESTCOUNTER)}" > "4" ]?Goto(test_end,end,1):Hangup())
+
+exten => end,1,NoOp()
+ same => n,UserEvent(CallFileMaxRetries, result: deleted)
+ same => n,Busy()
+ same => n,Hangup()
Propchange: asterisk/trunk/tests/pbx/call_file_retries_alwaysdelete/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/pbx/call_file_retries_alwaysdelete/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/pbx/call_file_retries_alwaysdelete/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/pbx/call_file_retries_alwaysdelete/retries_alwaysdelete.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/pbx/call_file_retries_alwaysdelete/retries_alwaysdelete.py?view=auto&rev=5043
==============================================================================
--- asterisk/trunk/tests/pbx/call_file_retries_alwaysdelete/retries_alwaysdelete.py (added)
+++ asterisk/trunk/tests/pbx/call_file_retries_alwaysdelete/retries_alwaysdelete.py Thu May 15 13:11:29 2014
@@ -1,0 +1,74 @@
+#!/usr/bin/env python
+"""Call File Retries for AlwaysDelete Option
+
+Copyright (C) 2014, Digium, Inc.
+Scott Emidy <jemidy at digium.com>
+
+This program is free software, distributed under the terms of
+the GNU General Public License Version 2.
+"""
+
+import os
+import logging
+
+from twisted.internet import reactor
+
+LOGGER = logging.getLogger(__name__)
+
+
+class AlwaysDeleteCallFileRetry(object):
+ """Checks whether the call file was deleted or not after execution """
+ def __init__(self, instance_config, test_object):
+ """Constructor """
+ super(AlwaysDeleteCallFileRetry, self).__init__()
+ self.test_object = test_object
+ self.call_file_config = instance_config
+
+ if self.call_file_config:
+ self.test_object.register_ami_observer(self.ami_connect)
+ else:
+ LOGGER.error("No configuration was specified for call files")
+ self.test_failed()
+
+ def ami_connect(self, ami):
+ """Handler for AMI Connection """
+ ami.registerEvent('UserEvent', self.user_event)
+
+ def test_failed(self):
+ """Checks to see whether or not the call files were
+ correctly specified """
+ self.test_object.set_passed(False)
+ self.test_object.stop_reactor()
+
+ def alwaysdelete_handler(self):
+ """AlwaysDelete File Handler """
+ dst_file = ("%s%s/outgoing/test0.call" %
+ (self.test_object.ast[int(self.call_file_config[0]['id'])]
+ .base,self.test_object.ast[int(self.call_file_config[0]
+ ['id'])].directories["astspooldir"]))
+
+ if os.path.isfile(dst_file):
+ LOGGER.info('Call File Was Not Deleted')
+ LOGGER.info('AlwaysDelete Location is %s' % dst_file)
+ self.test_object.set_passed(True)
+ os.remove(dst_file)
+ self.test_object.stop_reactor()
+ else:
+ LOGGER.error('Call File Was Executed and Deleted')
+ self.test_failed()
+
+ def user_event(self, ami, event):
+ """AlwaysDelete UserEvent Handler """
+ if event['userevent'] != 'CallFileMaxRetries':
+ return
+
+ if event['result'] == 'deleted':
+ params = self.call_file_config[0].get('call-file-params')
+ if params.get('AlwaysDelete') != 'no':
+ LOGGER.error("AlwaysDelete Was Not Set to 'no'")
+ self.test_failed()
+ else:
+ self.alwaysdelete_handler()
+ else:
+ LOGGER.error("Result Was Not Set to 'deleted'")
+ self.test_failed()
Propchange: asterisk/trunk/tests/pbx/call_file_retries_alwaysdelete/retries_alwaysdelete.py
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/pbx/call_file_retries_alwaysdelete/retries_alwaysdelete.py
------------------------------------------------------------------------------
svn:executable = *
Propchange: asterisk/trunk/tests/pbx/call_file_retries_alwaysdelete/retries_alwaysdelete.py
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/pbx/call_file_retries_alwaysdelete/retries_alwaysdelete.py
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/pbx/call_file_retries_alwaysdelete/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/pbx/call_file_retries_alwaysdelete/test-config.yaml?view=auto&rev=5043
==============================================================================
--- asterisk/trunk/tests/pbx/call_file_retries_alwaysdelete/test-config.yaml (added)
+++ asterisk/trunk/tests/pbx/call_file_retries_alwaysdelete/test-config.yaml Thu May 15 13:11:29 2014
@@ -1,0 +1,47 @@
+testinfo:
+ summary: 'Testing the AlwaysDelete Option of Call File Retries'
+ description: |
+ 'This test basically sets the 'AlwaysDelete' option to no, which
+ will ultimately not delete the call file from the outgoing folder
+ of the [astspooldir] after the call has been attempted. The test
+ uses a UserEvent in order to check that the file was not deleted,
+ and that the test ran as expected.'
+
+test-modules:
+ add-test-to-search-path: 'True'
+ test-object:
+ config-section: test-object-config
+ typename: 'test_case.TestCaseModule'
+ modules:
+ -
+ config-section: call-files-config
+ typename: 'retries_alwaysdelete.AlwaysDeleteCallFileRetry'
+ -
+ config-section: call-files-config
+ typename: 'pluggable_modules.CallFiles'
+
+test-object-config:
+ asterisk-instances: 1
+ connect-ami: True
+
+call-files-config:
+ -
+ ignore-originate-failure: 'no'
+ id: '0'
+ call-file-params:
+ Channel: 'Local/store at test_keep'
+ Context: 'test_end'
+ Extension: 'end_keep'
+ Priority: 1
+ AlwaysDelete: 'no'
+ MaxRetries: 4
+ RetryTime: 3
+ WaitTime: 1
+
+properties:
+ minversion: '1.8.0.0'
+ dependencies:
+ - python : 'twisted'
+ - python : 'starpy'
+ - asterisk : 'app_userevent'
+ - asterisk : 'pbx_spool'
Propchange: asterisk/trunk/tests/pbx/call_file_retries_alwaysdelete/test-config.yaml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/pbx/call_file_retries_alwaysdelete/test-config.yaml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/pbx/call_file_retries_alwaysdelete/test-config.yaml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/pbx/call_file_retries_archive/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/pbx/call_file_retries_archive/configs/ast1/extensions.conf?view=auto&rev=5043
==============================================================================
--- asterisk/trunk/tests/pbx/call_file_retries_archive/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/pbx/call_file_retries_archive/configs/ast1/extensions.conf Thu May 15 13:11:29 2014
@@ -1,0 +1,19 @@
+
+[globals]
+
+TESTCOUNTER=0
+
+[test_start]
+
+exten => start,1,Goto(test_archive,archive,1)
+
+[test_archive]
+
+exten => archive,1,NoOp()
+ same => n,Set(GLOBAL(TESTCOUNTER)=$[ ${GLOBAL(TESTCOUNTER)} + 1 ])
+ same => n,ExecIf($[ "${GLOBAL(TESTCOUNTER)}" > "4" ]?Goto(test_archive,end,1):Hangup())
+
+exten => end,1,NoOp()
+ same => n,UserEvent(CallFileMaxRetries, result: archived)
+ same => n,Busy()
+ same => n,Hangup()
Propchange: asterisk/trunk/tests/pbx/call_file_retries_archive/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/pbx/call_file_retries_archive/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/pbx/call_file_retries_archive/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/pbx/call_file_retries_archive/retries_archive.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/pbx/call_file_retries_archive/retries_archive.py?view=auto&rev=5043
==============================================================================
--- asterisk/trunk/tests/pbx/call_file_retries_archive/retries_archive.py (added)
+++ asterisk/trunk/tests/pbx/call_file_retries_archive/retries_archive.py Thu May 15 13:11:29 2014
@@ -1,0 +1,76 @@
+#!/usr/bin/env python
+"""Call File Retries for Archive Option
+
+Copyright (C) 2014, Digium, Inc.
+Scott Emidy <jemidy at digium.com>
+
+This program is free software, distributed under the terms of
+the GNU General Public License Version 2.
+"""
+
+import os
+import logging
+
+from twisted.internet import reactor
+
+LOGGER = logging.getLogger(__name__)
+
+
+class ArchiveCallFileRetry(object):
+ """Checks whether the call file was archived or not"""
+ def __init__(self, instance_config, test_object):
+ """Constructor """
+ super(ArchiveCallFileRetry, self).__init__()
+ self.test_object = test_object
+ self.call_file_config = instance_config
+
+ if self.call_file_config:
+ self.test_object.register_ami_observer(self.ami_connect)
+ else:
+ LOGGER.error("No configuration was specified for call files")
+ self.test_failed()
+
+ def ami_connect(self, ami):
+ """Handler for AMI Connection """
+ ami.registerEvent('UserEvent', self.user_event)
+
+ def test_failed(self):
+ """Checks to see whether or not the call files were
+ correctly specified """
+ self.test_object.set_passed(False)
+ self.test_object.stop_reactor()
+
+ def archive_handler(self):
+ """Archive File Handler """
+ chk_dir = ("%s%s/outgoing_done/test0.call" %
+ (self.test_object.ast[int(self.call_file_config[0]['id'])]
+ .base, self.test_object.ast[int(self.call_file_config[0]
+ ['id'])].directories["astspooldir"]))
+
+ if os.path.isfile(chk_dir):
+ LOGGER.info('Call File Was Archived')
+ LOGGER.info("Archive Location is %s" % chk_dir)
+ self.test_object.set_passed(True)
+ os.remove(chk_dir)
+ self.test_object.stop_reactor()
+ else:
+ LOGGER.info('Call File Was Not Archived')
+ self.test_failed()
+
+ def user_event(self, ami, event):
+ """Archive UserEvent Handler """
+ if event['userevent'] != 'CallFileMaxRetries':
+ return
+
+ if event['result'] == 'archived':
+ params = self.call_file_config[0].get('call-file-params')
+ if params.get('Archive') != 'yes':
+ LOGGER.error("Archive Was Not Set to Yes")
+ self.test_failed()
+ else:
+ # needs a second to reach the outgoing_done folder
+ reactor.callLater(1, self.archive_handler)
+ else:
+ LOGGER.error("Result Was Not Set to 'archived'")
+ self.test_failed()
+
Propchange: asterisk/trunk/tests/pbx/call_file_retries_archive/retries_archive.py
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/pbx/call_file_retries_archive/retries_archive.py
------------------------------------------------------------------------------
svn:executable = *
Propchange: asterisk/trunk/tests/pbx/call_file_retries_archive/retries_archive.py
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/pbx/call_file_retries_archive/retries_archive.py
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/pbx/call_file_retries_archive/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/pbx/call_file_retries_archive/test-config.yaml?view=auto&rev=5043
==============================================================================
--- asterisk/trunk/tests/pbx/call_file_retries_archive/test-config.yaml (added)
+++ asterisk/trunk/tests/pbx/call_file_retries_archive/test-config.yaml Thu May 15 13:11:29 2014
@@ -1,0 +1,45 @@
+testinfo:
+ summary: 'Testing the Archive Option of Call Files Max Retries'
+ description: |
+ 'This test checks to make sure that when Archive is set to yes
+ in a call file, that it stores that file in the [astspooldir]'s
+ outgoing_done folder. This is done through a UserEvent.'
+
+test-modules:
+ add-test-to-search-path: 'True'
+ test-object:
+ config-section: test-object-config
+ typename: 'test_case.TestCaseModule'
+ modules:
+ -
+ config-section: call-files-config
+ typename: 'retries_archive.ArchiveCallFileRetry'
+ -
+ config-section: call-files-config
+ typename: 'pluggable_modules.CallFiles'
+
+test-object-config:
+ asterisk-instances: 1
+ connect-ami: True
+
+call-files-config:
+ -
+ ignore-originate-failure: 'no'
+ id: '0'
+ call-file-params:
+ Channel: 'Local/start at test_start'
+ Context: 'test_archive'
+ Extension: 'archive'
+ Priority: 1
+ Archive: 'yes'
+ MaxRetries: 4
+ RetryTime: 3
+ WaitTime: 1
+
+properties:
+ minversion: '1.8.0.0'
+ dependencies:
+ - python : 'twisted'
+ - python : 'starpy'
+ - asterisk : 'app_userevent'
+ - asterisk : 'pbx_spool'
Propchange: asterisk/trunk/tests/pbx/call_file_retries_archive/test-config.yaml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/pbx/call_file_retries_archive/test-config.yaml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/pbx/call_file_retries_archive/test-config.yaml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/pbx/call_file_retries_fail/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/pbx/call_file_retries_fail/configs/ast1/extensions.conf?view=auto&rev=5043
==============================================================================
--- asterisk/trunk/tests/pbx/call_file_retries_fail/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/pbx/call_file_retries_fail/configs/ast1/extensions.conf Thu May 15 13:11:29 2014
@@ -1,0 +1,10 @@
+[test_result]
+
+exten => fail,1,NoOp()
+ same => n,Goto(test_fail,end_fail,1)
+
+[test_fail]
+
+exten => end_fail,1,NoOp()
+ same => n,UserEvent(CallFileMaxRetries, result: fail)
+ same => n,Busy()
Propchange: asterisk/trunk/tests/pbx/call_file_retries_fail/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/pbx/call_file_retries_fail/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/pbx/call_file_retries_fail/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/pbx/call_file_retries_fail/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/pbx/call_file_retries_fail/test-config.yaml?view=auto&rev=5043
==============================================================================
--- asterisk/trunk/tests/pbx/call_file_retries_fail/test-config.yaml (added)
+++ asterisk/trunk/tests/pbx/call_file_retries_fail/test-config.yaml Thu May 15 13:11:29 2014
@@ -1,0 +1,60 @@
+testinfo:
+ summary: 'Testing That Call Files Can Run Through All Max Retries'
+ description: |
+ 'The test required that a Local Channel be originated to a dialplan
+ extension that would always fail, so as to make sure that the Call
+ File ran through all of its max retries. This was shown through a
+ UserEvent within the pluggable_modules.py framework.'
+
+test-modules:
+ test-object:
+ config-section: test-object-config
+ typename: 'test_case.TestCaseModule'
+ modules:
+ -
+ config-section: call-files-config
+ typename: 'pluggable_modules.CallFiles'
+ -
+ config-section: ami-config
+ typename: 'ami.AMIEventModule'
+ -
+ config-section: hangup-config
+ typename: 'pluggable_modules.HangupMonitor'
+
+test-object-config:
+ asterisk-instances: 1
+ connect-ami: True
+
+call-files-config:
+ -
+ ignore-originate-failure: 'no'
+ id: '0'
+ call-file-params:
+ Channel: 'Local/fail at test_result'
+ Context: 'test_fail'
+ Extension: 'end_fail'
+ Priority: 1
+ MaxRetries: 4
+ RetryTime: 3
+ WaitTime: 2
+
+ami-config:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'UserEvent'
+ Result: 'fail'
+ count: '4'
+
+hangup-config:
+ ids: ['0']
+ min_calls: 8
+
+properties:
+ minversion: '1.8.0.0'
+ dependencies:
+ - python : 'twisted'
+ - python : 'starpy'
+ - asterisk : 'app_userevent'
+ - asterisk : 'pbx_spool'
Propchange: asterisk/trunk/tests/pbx/call_file_retries_fail/test-config.yaml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/pbx/call_file_retries_fail/test-config.yaml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/pbx/call_file_retries_fail/test-config.yaml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/pbx/call_file_retries_success/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/pbx/call_file_retries_success/configs/ast1/extensions.conf?view=auto&rev=5043
==============================================================================
--- asterisk/trunk/tests/pbx/call_file_retries_success/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/pbx/call_file_retries_success/configs/ast1/extensions.conf Thu May 15 13:11:29 2014
@@ -1,0 +1,18 @@
+
+[globals]
+
+TESTCOUNTER=0
+
+[test_retry]
+
+exten => retry_1,1,Goto(test_set,failure,1)
+
+[test_set]
+
+exten => failure,1,NoOp()
+ same => n,Set(GLOBAL(TESTCOUNTER)=$[ ${GLOBAL(TESTCOUNTER)} + 1 ])
+ same => n,ExecIf($[ "${GLOBAL(TESTCOUNTER)}" > "1" ]?Goto(test_set,end,1):Hangup())
+
+exten => end,1,Answer()
+ same => n,UserEvent(CallFileMaxRetries, result: success)
+ same => n,Hangup()
Propchange: asterisk/trunk/tests/pbx/call_file_retries_success/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/pbx/call_file_retries_success/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/pbx/call_file_retries_success/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/pbx/call_file_retries_success/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/pbx/call_file_retries_success/test-config.yaml?view=auto&rev=5043
==============================================================================
--- asterisk/trunk/tests/pbx/call_file_retries_success/test-config.yaml (added)
+++ asterisk/trunk/tests/pbx/call_file_retries_success/test-config.yaml Thu May 15 13:11:29 2014
@@ -1,0 +1,62 @@
+testinfo:
+ summary: 'Test that Lets the Call File Fail Once Then is Answered'
+ description: |
+ 'This test originates a Local channel through a call file that
+ fails one time around, yet before the max retries are reached
+ the Local channel is answered. This was confirmed through a
+ UserEvent that tells whether or not the call file was actually
+ executed.'
+
+test-modules:
+ add-test-to-search-path: 'True'
+ test-object:
+ config-section: test-object-config
+ typename: 'test_case.TestCaseModule'
+ modules:
+ -
+ config-section: hangup-config
+ typename: 'pluggable_modules.HangupMonitor'
+ -
+ config-section: ami-config
+ typename: 'ami.AMIEventModule'
+ -
+ config-section: call-files-config
+ typename: 'pluggable_modules.CallFiles'
+
+test-object-config:
+ asterisk-instances: 1
+ connect-ami: True
+
+call-files-config:
+ -
+ ignore-originate-failure: 'no'
+ id: '0'
+ call-file-params:
+ Channel: 'Local/retry_1 at test_retry'
+ Context: 'test_set'
+ Extension: 'end'
+ Priority: 1
+ MaxRetries: 10
+ RetryTime: 3
+ WaitTime: 1
+
+ami-config:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'UserEvent'
+ Result: 'success'
+ count: '1'
+
+hangup-config:
+ ids: [ '0', ]
+ min_calls: 4
+
+properties:
+ minversion: '1.8.0.0'
+ dependencies:
+ - python : 'twisted'
+ - python : 'starpy'
+ - asterisk : 'app_userevent'
+ - asterisk : 'pbx_spool'
Propchange: asterisk/trunk/tests/pbx/call_file_retries_success/test-config.yaml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/pbx/call_file_retries_success/test-config.yaml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/pbx/call_file_retries_success/test-config.yaml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: asterisk/trunk/tests/pbx/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/pbx/tests.yaml?view=diff&rev=5043&r1=5042&r2=5043
==============================================================================
--- asterisk/trunk/tests/pbx/tests.yaml (original)
+++ asterisk/trunk/tests/pbx/tests.yaml Thu May 15 13:11:29 2014
@@ -1,5 +1,9 @@
# Enter tests here in the order they should be considered for execution:
tests:
+ - test: 'call_file_retries_archive'
+ - test: 'call_file_retries_alwaysdelete'
+ - test: 'call_file_retries_fail'
+ - test: 'call_file_retries_success'
- test: 'create_call_files'
- test: 'ast_db'
- test: 'dialplan'
More information about the asterisk-commits
mailing list