[asterisk-commits] mjordan: testsuite/asterisk/trunk r4977 - in /asterisk/trunk/tests/apps/disa/...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Apr 21 09:33:09 CDT 2014
Author: mjordan
Date: Mon Apr 21 09:33:01 2014
New Revision: 4977
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4977
Log:
apps/disa/nominal/no_context: Add DISA test for not specifying a context
This test uses a Local channel to enter the DISA application. The application
is invoked without a context to jump to, relying instead on the default 'disa'
context. When the channel enters the correct extension, the channel is placed
into the extension in the 'disa' context. The test verifies that the channel
goes to the correct extension.
Review: https://reviewboard.asterisk.org/r/3459
ASTERISK-23523 #close
Reported by: Matt Jordan
patches:
disa_no_context_diff uploaded by bford (License 6580)
Added:
asterisk/trunk/tests/apps/disa/nominal/no_context/
asterisk/trunk/tests/apps/disa/nominal/no_context/configs/
asterisk/trunk/tests/apps/disa/nominal/no_context/configs/ast1/
asterisk/trunk/tests/apps/disa/nominal/no_context/configs/ast1/extensions.conf (with props)
asterisk/trunk/tests/apps/disa/nominal/no_context/test-config.yaml (with props)
Modified:
asterisk/trunk/tests/apps/disa/nominal/tests.yaml
Added: asterisk/trunk/tests/apps/disa/nominal/no_context/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/disa/nominal/no_context/configs/ast1/extensions.conf?view=auto&rev=4977
==============================================================================
--- asterisk/trunk/tests/apps/disa/nominal/no_context/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/apps/disa/nominal/no_context/configs/ast1/extensions.conf Mon Apr 21 09:33:01 2014
@@ -1,0 +1,33 @@
+; Tests the DISA application to see if not entering a context 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 and context.
+; ----------------------------------------------------------------------
+
+exten => start,1,NoOp()
+ same => n,Answer()
+ same => n,DISA(no-password)
+
+exten => i,1,NoOp()
+ same => n,UserEvent(TestResult,result:fail)
+ same => n,Hangup()
+
+[disa]
+
+exten => 200,1,NoOp()
+ same => n,UserEvent(TestResult,result:pass)
+ same => n,Hangup()
Propchange: asterisk/trunk/tests/apps/disa/nominal/no_context/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/apps/disa/nominal/no_context/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/apps/disa/nominal/no_context/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/apps/disa/nominal/no_context/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/disa/nominal/no_context/test-config.yaml?view=auto&rev=4977
==============================================================================
--- asterisk/trunk/tests/apps/disa/nominal/no_context/test-config.yaml (added)
+++ asterisk/trunk/tests/apps/disa/nominal/no_context/test-config.yaml Mon Apr 21 09:33:01 2014
@@ -1,0 +1,83 @@
+test-info:
+ summary: 'Tests that the DISA applciation without context is working correctly.'
+ description:
+ This test has a local channel enter the DISA application without a specified context,
+ enter the desired extension, and sends it to that extension at the disa context.
+
+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: '200'
+ -
+ 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/nominal/no_context/test-config.yaml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/apps/disa/nominal/no_context/test-config.yaml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/apps/disa/nominal/no_context/test-config.yaml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: asterisk/trunk/tests/apps/disa/nominal/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/disa/nominal/tests.yaml?view=diff&rev=4977&r1=4976&r2=4977
==============================================================================
--- asterisk/trunk/tests/apps/disa/nominal/tests.yaml (original)
+++ asterisk/trunk/tests/apps/disa/nominal/tests.yaml Mon Apr 21 09:33:01 2014
@@ -2,3 +2,4 @@
tests:
- test: 'authenticate'
- test: 'no_authentication'
+ - test: 'no_context'
More information about the asterisk-commits
mailing list