[svn-commits] mjordan: testsuite/asterisk/trunk r4978 - in /asterisk/trunk/tests/apps/disa:...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Apr 21 09:58:24 CDT 2014


Author: mjordan
Date: Mon Apr 21 09:58:18 2014
New Revision: 4978

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4978
Log:
apps/disa/off-nominal/bad_auth: Add test that verifies invalid authentiation

This test verifies that an invalid password passed to the DISA application does
not result in an authenticated inbound call. An inbound Local channel enters
the DISA application that specifies a passcode and provides an incorrect
passcode. The channel then waits until the DISA application times out and
is hung up on.

Review: https://reviewboard.asterisk.org/r/3458

ASTERISK-23525 #close
Reported by: Matt Jordan
patches:
  disa_bad_auth_diff uploaded by jemidy (License 6581)


Added:
    asterisk/trunk/tests/apps/disa/off-nominal/
    asterisk/trunk/tests/apps/disa/off-nominal/bad_auth/
    asterisk/trunk/tests/apps/disa/off-nominal/bad_auth/configs/
    asterisk/trunk/tests/apps/disa/off-nominal/bad_auth/configs/ast1/
    asterisk/trunk/tests/apps/disa/off-nominal/bad_auth/configs/ast1/extensions.conf   (with props)
    asterisk/trunk/tests/apps/disa/off-nominal/bad_auth/test-config.yaml   (with props)
    asterisk/trunk/tests/apps/disa/off-nominal/tests.yaml   (with props)
Modified:
    asterisk/trunk/tests/apps/disa/tests.yaml

Added: asterisk/trunk/tests/apps/disa/off-nominal/bad_auth/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/disa/off-nominal/bad_auth/configs/ast1/extensions.conf?view=auto&rev=4978
==============================================================================
--- asterisk/trunk/tests/apps/disa/off-nominal/bad_auth/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/apps/disa/off-nominal/bad_auth/configs/ast1/extensions.conf Mon Apr 21 09:58:18 2014
@@ -1,0 +1,20 @@
+; ----------------------------------------------------------------------
+; ***Required***
+; ----------------------------------------------------------------------
+[default]
+
+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 => begin,1,NoOp()
+    same => n,Answer()
+    same => n,DISA(1234)

Propchange: asterisk/trunk/tests/apps/disa/off-nominal/bad_auth/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/apps/disa/off-nominal/bad_auth/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/apps/disa/off-nominal/bad_auth/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/trunk/tests/apps/disa/off-nominal/bad_auth/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/disa/off-nominal/bad_auth/test-config.yaml?view=auto&rev=4978
==============================================================================
--- asterisk/trunk/tests/apps/disa/off-nominal/bad_auth/test-config.yaml (added)
+++ asterisk/trunk/tests/apps/disa/off-nominal/bad_auth/test-config.yaml Mon Apr 21 09:58:18 2014
@@ -1,0 +1,59 @@
+test-info:
+    summary: 'Test for Off-Nominal DISA Bad Authentication'
+    description:
+        This test has an inbound call enter the DISA application that has a
+        passcode. The channel provides an invalid passcode, and the channel
+        is hung up.
+
+properties:
+    minversion: '1.8.0.0'
+    dependencies:
+        - python : 'twisted'
+        - python : 'starpy'
+        - asterisk : 'app_userevent'
+        - asterisk : 'app_disa'
+    tags:
+        - apps
+        - disa
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: 'apptest.AppTest'
+
+test-object-config:
+  app: 'DISA'
+  scenarios:
+    -
+      # Scenario 1
+      channels:
+        -
+          channel-id: 'DISA-Channel'
+          channel-name: 'Local/begin 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: '124#'
+            -
+              type: 'headermatch'
+              conditions:
+                match:
+                  Event: 'Hangup'
+                  Channel: 'Local/begin at default-.*'
+              actions:
+                -
+                  action-type: 'end-scenario'

Propchange: asterisk/trunk/tests/apps/disa/off-nominal/bad_auth/test-config.yaml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/apps/disa/off-nominal/bad_auth/test-config.yaml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/apps/disa/off-nominal/bad_auth/test-config.yaml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: 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=auto&rev=4978
==============================================================================
--- asterisk/trunk/tests/apps/disa/off-nominal/tests.yaml (added)
+++ asterisk/trunk/tests/apps/disa/off-nominal/tests.yaml Mon Apr 21 09:58:18 2014
@@ -1,0 +1,3 @@
+# Enter tests here in the order they should be considered for execution:
+tests:
+    - test: 'bad_auth'

Propchange: asterisk/trunk/tests/apps/disa/off-nominal/tests.yaml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/apps/disa/off-nominal/tests.yaml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/apps/disa/off-nominal/tests.yaml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: asterisk/trunk/tests/apps/disa/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/apps/disa/tests.yaml?view=diff&rev=4978&r1=4977&r2=4978
==============================================================================
--- asterisk/trunk/tests/apps/disa/tests.yaml (original)
+++ asterisk/trunk/tests/apps/disa/tests.yaml Mon Apr 21 09:58:18 2014
@@ -1,3 +1,4 @@
 # Enter tests here in the order they should be considered for execution:
 tests:
     - dir: 'nominal'
+    - dir: 'off-nominal'




More information about the svn-commits mailing list