[asterisk-commits] mjordan: testsuite/asterisk/trunk r4976 - in /asterisk/trunk/tests/apps/disa/...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Apr 21 09:24:44 CDT 2014
Author: mjordan
Date: Mon Apr 21 09:24:32 2014
New Revision: 4976
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4976
Log:
apps/disa/nominal/no_authentication: Add test for DISA that bypasses auth
This test spawns a Local channel that is put into the DISA application. The
application is launched with the 'no-password' option, such that the channel is
not prompted for a password. The channel enters in a valid extension, and the
test verifies that the channel is placed in that extension.
Review: https://reviewboard.asterisk.org/r/3460
ASTERISK-23522 #close
Reported by: Matt Jordan
patches:
disa_no_authentication.diff uploaded by bford (License 6580)
Added:
asterisk/trunk/tests/apps/disa/nominal/no_authentication/
asterisk/trunk/tests/apps/disa/nominal/no_authentication/configs/
asterisk/trunk/tests/apps/disa/nominal/no_authentication/configs/ast1/
asterisk/trunk/tests/apps/disa/nominal/no_authentication/configs/ast1/extensions.conf (with props)
asterisk/trunk/tests/apps/disa/nominal/no_authentication/test-config.yaml (with props)
Modified:
asterisk/trunk/tests/apps/disa/nominal/tests.yaml
Added: asterisk/trunk/tests/apps/disa/nominal/no_authentication/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/disa/nominal/no_authentication/configs/ast1/extensions.conf?view=auto&rev=4976
==============================================================================
--- asterisk/trunk/tests/apps/disa/nominal/no_authentication/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/apps/disa/nominal/no_authentication/configs/ast1/extensions.conf Mon Apr 21 09:24:32 2014
@@ -1,0 +1,31 @@
+; Tests the DISA application to see if no authentication 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)
+
+exten => 200,1,NoOp()
+ same => n,UserEvent(TestResult,result:pass)
+ same => n,Hangup()
+
+exten => i,1,NoOp()
+ same => n,UserEvent(TestResult,result:fail)
+ same => n,Hangup()
Propchange: asterisk/trunk/tests/apps/disa/nominal/no_authentication/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/apps/disa/nominal/no_authentication/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/apps/disa/nominal/no_authentication/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/apps/disa/nominal/no_authentication/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/disa/nominal/no_authentication/test-config.yaml?view=auto&rev=4976
==============================================================================
--- asterisk/trunk/tests/apps/disa/nominal/no_authentication/test-config.yaml (added)
+++ asterisk/trunk/tests/apps/disa/nominal/no_authentication/test-config.yaml Mon Apr 21 09:24:32 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 with no authentication,
+ enter the desired extension, and sends it to that 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: '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_authentication/test-config.yaml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/apps/disa/nominal/no_authentication/test-config.yaml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/apps/disa/nominal/no_authentication/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=4976&r1=4975&r2=4976
==============================================================================
--- asterisk/trunk/tests/apps/disa/nominal/tests.yaml (original)
+++ asterisk/trunk/tests/apps/disa/nominal/tests.yaml Mon Apr 21 09:24:32 2014
@@ -1,3 +1,4 @@
# Enter tests here in the order they should be considered for execution:
tests:
- test: 'authenticate'
+ - test: 'no_authentication'
More information about the asterisk-commits
mailing list