[asterisk-commits] mjordan: testsuite/asterisk/trunk r4985 - in /asterisk/trunk/tests/apps/disa/...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Apr 25 09:32:59 CDT 2014
Author: mjordan
Date: Fri Apr 25 09:32:54 2014
New Revision: 4985
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4985
Log:
tests/apps/disa/off-nominal: Verify handling of an invalid extension jump
This tests verifies that a channel in the DISA application will be sent to
the 'i' extension if the user enters an invalid extension.
Review: https://reviewboard.asterisk.org/r/3457/
ASTERISK-23526 #close
Reported by: Matt Jordan
patches:
disa_invalid_exten_diff uploaded by bford (License 6580)
Added:
asterisk/trunk/tests/apps/disa/off-nominal/invalid_exten/
asterisk/trunk/tests/apps/disa/off-nominal/invalid_exten/configs/
asterisk/trunk/tests/apps/disa/off-nominal/invalid_exten/configs/ast1/
asterisk/trunk/tests/apps/disa/off-nominal/invalid_exten/configs/ast1/extensions.conf (with props)
asterisk/trunk/tests/apps/disa/off-nominal/invalid_exten/test-config.yaml (with props)
Modified:
asterisk/trunk/tests/apps/disa/off-nominal/tests.yaml
Added: asterisk/trunk/tests/apps/disa/off-nominal/invalid_exten/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/disa/off-nominal/invalid_exten/configs/ast1/extensions.conf?view=auto&rev=4985
==============================================================================
--- asterisk/trunk/tests/apps/disa/off-nominal/invalid_exten/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/apps/disa/off-nominal/invalid_exten/configs/ast1/extensions.conf Fri Apr 25 09:32:54 2014
@@ -1,0 +1,32 @@
+; Tests the DISA application to see if entering an invalid extension
+; works as intended.
+
+[default]
+
+; ----------------------------------------------------------------------
+; ***Required***
+; ----------------------------------------------------------------------
+exten => sendDTMF,1,NoOp()
+ same => n,Verbose(1, Sending DTMF Signal ${DTMF_TO_SEND})
+ same => n,SendDTMF(${DTMF_TO_SEND})
+ same => n,Goto(default,wait,1)
+
+exten => wait,1,NoOp()
+ same => n,Wait(10000)
+
+; ----------------------------------------------------------------------
+; Test extensions.
+; ----------------------------------------------------------------------
+
+exten => start,1,NoOp()
+ same => n,Answer()
+ same => n,DISA(no-password,default)
+
+; DTMF sequence should be exten 100
+exten => 101,1,NoOp()
+ same => n,UserEvent(TestResult,result:fail)
+ same => n,Hangup()
+
+exten => i,1,NoOp()
+ same => n,UserEvent(TestResult,result:pass)
+ same => n,Hangup()
Propchange: asterisk/trunk/tests/apps/disa/off-nominal/invalid_exten/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/apps/disa/off-nominal/invalid_exten/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/apps/disa/off-nominal/invalid_exten/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/apps/disa/off-nominal/invalid_exten/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/disa/off-nominal/invalid_exten/test-config.yaml?view=auto&rev=4985
==============================================================================
--- asterisk/trunk/tests/apps/disa/off-nominal/invalid_exten/test-config.yaml (added)
+++ asterisk/trunk/tests/apps/disa/off-nominal/invalid_exten/test-config.yaml Fri Apr 25 09:32:54 2014
@@ -1,0 +1,83 @@
+test-info:
+ summary: 'Tests that the DISA applciation with authentication is working correctly.'
+ description:
+ This test has a local channel enter the DISA application, enter an invalid extension,
+ and sends it to the i extension.
+
+test-modules:
+ test-object:
+ config-section: test-object-config
+ typename: 'apptest.AppTest'
+
+test-object-config:
+ app: 'DISA'
+ scenarios:
+ -
+ # Scenario 1
+ # Goes through the steps in the description above.
+ channels:
+ -
+ channel-id: 'DISA-Channel'
+ channel-name: 'Local/start at default'
+ context: 'default'
+ exten: 'wait'
+ start-on-create: True
+ events:
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'Newexten'
+ Application: 'DISA'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Channel entered DISA application'
+ -
+ action-type: 'send-dtmf'
+ delay: 1
+ dtmf: '100#'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'UserEvent'
+ UserEvent: 'TestResult'
+ requirements:
+ match:
+ Result: 'pass'
+ actions:
+ -
+ action-type: 'set-expected-result'
+ expected-result: 'Channel entered extension successfully!'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'UserEvent'
+ UserEvent: 'TestResult'
+ Result: 'fail'
+ actions:
+ -
+ action-type: 'fail-test'
+ message: 'Channel did not enter extension. Test failed'
+ -
+ type: 'headermatch'
+ conditions:
+ match:
+ Event: 'Hangup'
+ Channel: 'Local/start at default-.*'
+ actions:
+ -
+ action-type: 'end-scenario'
+
+properties:
+ minversion: '1.8.0.0'
+ dependencies:
+ - python : 'twisted'
+ - python : 'starpy'
+ - asterisk : 'app_userevent'
+ - asterisk : 'app_disa'
+ tags:
+ - apps
+ - disa
Propchange: asterisk/trunk/tests/apps/disa/off-nominal/invalid_exten/test-config.yaml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/apps/disa/off-nominal/invalid_exten/test-config.yaml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/apps/disa/off-nominal/invalid_exten/test-config.yaml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: asterisk/trunk/tests/apps/disa/off-nominal/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/disa/off-nominal/tests.yaml?view=diff&rev=4985&r1=4984&r2=4985
==============================================================================
--- asterisk/trunk/tests/apps/disa/off-nominal/tests.yaml (original)
+++ asterisk/trunk/tests/apps/disa/off-nominal/tests.yaml Fri Apr 25 09:32:54 2014
@@ -1,3 +1,4 @@
# Enter tests here in the order they should be considered for execution:
tests:
- test: 'bad_auth'
+ - test: 'invalid_exten'
More information about the asterisk-commits
mailing list