[asterisk-commits] qwell: branch qwell/CORS r3931 - in /asterisk/team/qwell/CORS: ./ configs/ li...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jul 19 11:06:51 CDT 2013


Author: qwell
Date: Fri Jul 19 11:06:48 2013
New Revision: 3931

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=3931
Log:
Multiple revisions 3898,3900-3901,3903,3913,3916,3921,3925

........
  r3898 | dlee | 2013-07-11 15:28:43 -0500 (Thu, 11 Jul 2013) | 5 lines
  
  Fixed authentication test for this morning's ARI changes.
  
  Also got rid of the extra http.conf files, since the default testsuite
  config is fine. And gave the testsuite a default ARI config.
........
  r3900 | mjordan | 2013-07-12 07:48:27 -0500 (Fri, 12 Jul 2013) | 15 lines
  
  Allow the Asterisk Test Suite to run outside of an Asterisk source directory
  
  For a host of historical reasons, the Asterisk Test Suite used to have to run as a
  subdirectory inside of the Asterisk source.
  
  This actually hasn't been needed for quite some time. The last hold out *was* the
  buildoptions library; however, as it turns out, buildoptions will check the installed
  Asterisk headers for the build options it needs to execute.
  
  This patch removes the checks and updates the README. It also makes the buildoptions
  library raise an Exception if it couldn't find the header - this really is needed, as
  certain build options (such as TEST_FRAMEWORK) are needed for a large number of tests to
  execute.
  
  Review: https://reviewboard.asterisk.org/r/2659
........
  r3901 | mjordan | 2013-07-12 08:13:06 -0500 (Fri, 12 Jul 2013) | 5 lines
  
  Fix SIP Hold test path problems
  
  After the Test Suite was updated to handle long paths, the SIP Hold test was broken
  due to an incorrect construction of the path to SIPp injection files. This patch fixes
  that so that it builds the path to these files correctly.
........
  r3903 | mjordan | 2013-07-12 08:23:10 -0500 (Fri, 12 Jul 2013) | 9 lines
  
  Fix Local channel test execution for Asterisk versions prior to 12
  
  The Local channel tests were failing for two reasons:
   (1) The SimpleTestCase wasn't detecting the hangup of one of the Local channel halves
       when that Local channel was optimized via a Masquerade. The Local channel half
       gets renamed with a "<ZOMBIE>" suffix; this caused the explicit channel name
       comparison to fail. We now do a partial match comparison.
   (2) We need to check *something* to verify test pass/failure. We now verify that a
       Masquerade event occurs when we expect it to and not when we don't.
........
  r3913 | mjordan | 2013-07-13 16:00:26 -0500 (Sat, 13 Jul 2013) | 21 lines
  
  Update version string parsing to handle Debian style version suffixes
  
  If an Asterisk version string follows the following nomenclature:
      "1.8.13.1~dfsg-2"
  An exception will be thrown.
  
  The version string parsing assumes that for "normal" Asterisk versions,
  any additional tags added to a version are a "feature", and that those
  features are denoted by a hyphen as opposed to a tilde. Debian will
  append a "~dfsg[<num>]" when a source tarball needs to be repackaged,
  normally due to not complying with the DFSG (thank you Tzafrir for
  the explanation!)
  
  This patch updates the version parsing to split the version string into
  number and feature parts on both a '~' and a '-'. It also adds dfsg to
  the accepted "features" list.
  
  (closes issue ASTERISK-21320)
  Reported by: Tzafrir Cohen
  patches:
    Fix-parsing-a-dfsg-version.patch uploaded by Tzafrir Cohen (license 5035)
........
  r3916 | mjordan | 2013-07-13 18:32:02 -0500 (Sat, 13 Jul 2013) | 10 lines
  
  Fix blind-transfer-accountcode; convert originate-cdr-disposition
  
  This patch does two things:
   * It converts the originate-cdr-disposition test from Lua to a pluggable
     module based test.
   * It fixes the blind-transfer-accountcode test such that it runs correctly
     with Asterisk 12.
  
  (closes issue ASTERISK-21831)
  Reported by: Matt Jordan
........
  r3921 | mjordan | 2013-07-16 16:27:26 -0500 (Tue, 16 Jul 2013) | 4 lines
  
  Add an Asterisk start observer to the TestCase
  
  This is a useful notification point that will let pluggable modules know
  when Asterisk has started, but before AMI has connected
........
  r3925 | dlee | 2013-07-18 15:14:19 -0500 (Thu, 18 Jul 2013) | 7 lines
  
  AutoBahn bug workaround.
  
  With AuthBahn WebSocket client, we must specify the subprotocol that the
  server specifies.
  
  See https://github.com/tavendo/AutobahnPython/pull/147
........

Merged revisions 3898,3900-3901,3903,3913,3916,3921,3925 from http://svn.asterisk.org/svn/testsuite/asterisk/trunk

Added:
    asterisk/team/qwell/CORS/configs/ari.conf
      - copied unchanged from r3925, asterisk/trunk/configs/ari.conf
Removed:
    asterisk/team/qwell/CORS/tests/cdr/cdr_properties/blind-transfer-accountcode/run-test
    asterisk/team/qwell/CORS/tests/cdr/cdr_properties/blind-transfer-accountcode/test.lua
    asterisk/team/qwell/CORS/tests/cdr/originate-cdr-disposition/run-test
    asterisk/team/qwell/CORS/tests/cdr/originate-cdr-disposition/test.lua
    asterisk/team/qwell/CORS/tests/rest_api/authentication/configs/ast1/http.conf
    asterisk/team/qwell/CORS/tests/rest_api/continue/configs/ast1/ari.conf
    asterisk/team/qwell/CORS/tests/rest_api/continue/configs/ast1/http.conf
Modified:
    asterisk/team/qwell/CORS/   (props changed)
    asterisk/team/qwell/CORS/README.txt
    asterisk/team/qwell/CORS/lib/python/asterisk/SimpleTestCase.py
    asterisk/team/qwell/CORS/lib/python/asterisk/TestCase.py
    asterisk/team/qwell/CORS/lib/python/asterisk/ari.py
    asterisk/team/qwell/CORS/lib/python/asterisk/buildoptions.py
    asterisk/team/qwell/CORS/lib/python/asterisk/version.py
    asterisk/team/qwell/CORS/runtests.py
    asterisk/team/qwell/CORS/tests/cdr/cdr-tests.py
    asterisk/team/qwell/CORS/tests/cdr/cdr_properties/blind-transfer-accountcode/sipp/call-then-blind-transfer.xml
    asterisk/team/qwell/CORS/tests/cdr/cdr_properties/blind-transfer-accountcode/test-config.yaml
    asterisk/team/qwell/CORS/tests/cdr/cdr_properties/tests.yaml
    asterisk/team/qwell/CORS/tests/cdr/originate-cdr-disposition/test-config.yaml
    asterisk/team/qwell/CORS/tests/channels/SIP/sip_hold/run-test
    asterisk/team/qwell/CORS/tests/channels/local/local_app/test-config.yaml
    asterisk/team/qwell/CORS/tests/channels/local/local_call/test-config.yaml
    asterisk/team/qwell/CORS/tests/rest_api/authentication/configs/ast1/ari.conf
    asterisk/team/qwell/CORS/tests/rest_api/authentication/run-test

Propchange: asterisk/team/qwell/CORS/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Jul 19 11:06:48 2013
@@ -1,1 +1,1 @@
-/asterisk/trunk:1-3895
+/asterisk/trunk:1-3930

Modified: asterisk/team/qwell/CORS/README.txt
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/qwell/CORS/README.txt?view=diff&rev=3931&r1=3930&r2=3931
==============================================================================
--- asterisk/team/qwell/CORS/README.txt (original)
+++ asterisk/team/qwell/CORS/README.txt Fri Jul 19 11:06:48 2013
@@ -183,8 +183,7 @@
     $ ./configure && make
     $ make install
 
-Check out the test suite inside of the Asterisk source tree.  In this case, we
-will have the testsuite directory inside of the asterisk-trunk directory.
+Check out the test suite:
     $ svn co http://svn.digium.com/svn/testsuite/asterisk/trunk testsuite
     $ cd testsuite
 
@@ -202,8 +201,6 @@
 For more syntax information:
     $ ./runtests.py --help
 
-
-
 As an alternative to the above, you can use run-local:
 
 Get the Asterisk source tree you want to test:
@@ -213,8 +210,7 @@
 Optionally configure and make it:
     $ ./configure && make
 
-Check out the test suite inside of the Asterisk source tree.  In this case, we
-will have the testsuite directory inside of the asterisk-trunk directory.
+Check out the test suite:
     $ svn co http://svn.digium.com/svn/testsuite/asterisk/trunk testsuite
     $ cd testsuite
 

Modified: asterisk/team/qwell/CORS/lib/python/asterisk/SimpleTestCase.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/qwell/CORS/lib/python/asterisk/SimpleTestCase.py?view=diff&rev=3931&r1=3930&r2=3931
==============================================================================
--- asterisk/team/qwell/CORS/lib/python/asterisk/SimpleTestCase.py (original)
+++ asterisk/team/qwell/CORS/lib/python/asterisk/SimpleTestCase.py Fri Jul 19 11:06:48 2013
@@ -145,7 +145,7 @@
         next new call '''
 
         candidate_channel = [chan for chan in self._tracking_channels
-                             if chan['channel'] == event['channel']]
+                             if chan['channel'] in event['channel']]
         if (len(candidate_channel)):
             LOGGER.debug("Channel %s hung up; removing" % event['channel'])
             self._tracking_channels.remove(candidate_channel[0])

Modified: asterisk/team/qwell/CORS/lib/python/asterisk/TestCase.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/qwell/CORS/lib/python/asterisk/TestCase.py?view=diff&rev=3931&r1=3930&r2=3931
==============================================================================
--- asterisk/team/qwell/CORS/lib/python/asterisk/TestCase.py (original)
+++ asterisk/team/qwell/CORS/lib/python/asterisk/TestCase.py Fri Jul 19 11:06:48 2013
@@ -93,6 +93,7 @@
         self._stopping = False
         self.testlogdir = os.path.join(Asterisk.test_suite_root, self.base, str(os.getpid()))
         self.ast_version = AsteriskVersion()
+        self._start_callbacks = []
         self._stop_callbacks = []
         self._ami_callbacks = []
         self._pcap_callbacks = []
@@ -282,6 +283,8 @@
 
         def __run_callback(result):
             """ Notify the test that we are running """
+            for callback in self._start_callbacks:
+                callback(self)
             self.run()
             return result
 
@@ -503,6 +506,16 @@
         '''
         self._pcap_callbacks.append(callback)
 
+    def register_start_observer(self, callback):
+        ''' Register an observer that will be called when all Asterisk instances have
+        started
+
+        Parameters:
+        callback The deferred callback function to be called when all instances of
+        Asterisk have started. This will be passed this object as a parameter.
+        '''
+        self._start_callbacks.append(callback)
+
     def register_stop_observer(self, callback):
         ''' Register an observer that will be called when Asterisk is stopped
 

Modified: asterisk/team/qwell/CORS/lib/python/asterisk/ari.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/qwell/CORS/lib/python/asterisk/ari.py?view=diff&rev=3931&r1=3930&r2=3931
==============================================================================
--- asterisk/team/qwell/CORS/lib/python/asterisk/ari.py (original)
+++ asterisk/team/qwell/CORS/lib/python/asterisk/ari.py Fri Jul 19 11:06:48 2013
@@ -96,7 +96,7 @@
               (host, port,
                urllib.urlencode({'app': apps, 'api_key': '%s:%s' % userpass}))
         logger.info("WebSocketClientFactory(url=%s)" % url)
-        WebSocketClientFactory.__init__(self, url)
+        WebSocketClientFactory.__init__(self, url, debug = True, protocols=['ari'])
         self.on_event = on_event
         self.timeout_secs = timeout_secs
         self.protocol = self.__build_protocol

Modified: asterisk/team/qwell/CORS/lib/python/asterisk/buildoptions.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/qwell/CORS/lib/python/asterisk/buildoptions.py?view=diff&rev=3931&r1=3930&r2=3931
==============================================================================
--- asterisk/team/qwell/CORS/lib/python/asterisk/buildoptions.py (original)
+++ asterisk/team/qwell/CORS/lib/python/asterisk/buildoptions.py Fri Jul 19 11:06:48 2013
@@ -41,7 +41,7 @@
         for p in buildopts_hdr_paths:
             if (self.__parse_buildopts_file(p)):
                 return
-        print "Failed to open any build options files"
+        raise Exception("Failed to open any build options files")
 
 
     def __parse_buildopts_file(self, path):

Modified: asterisk/team/qwell/CORS/lib/python/asterisk/version.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/qwell/CORS/lib/python/asterisk/version.py?view=diff&rev=3931&r1=3930&r2=3931
==============================================================================
--- asterisk/team/qwell/CORS/lib/python/asterisk/version.py (original)
+++ asterisk/team/qwell/CORS/lib/python/asterisk/version.py Fri Jul 19 11:06:48 2013
@@ -29,7 +29,7 @@
     This class handles Asterisk version strings.
     """
 
-    supported_features = [ 'cert', 'digiumphones' ]
+    supported_features = [ 'cert', 'digiumphones', 'dfsg' ]
 
     supported_modifiers = [ 'rc', 'beta' ]
 
@@ -104,7 +104,7 @@
 
         raw_version = raw_version.replace('Asterisk ', '')
 
-        tokens = raw_version.split('-')
+        tokens = re.split('[-~]', raw_version)
         count = 0
         while (count < len(tokens)):
             token = tokens[count]

Modified: asterisk/team/qwell/CORS/runtests.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/qwell/CORS/runtests.py?view=diff&rev=3931&r1=3930&r2=3931
==============================================================================
--- asterisk/team/qwell/CORS/runtests.py (original)
+++ asterisk/team/qwell/CORS/runtests.py Fri Jul 19 11:06:48 2013
@@ -398,19 +398,6 @@
             help="List available tags")
     (options, args) = parser.parse_args(argv)
 
-    # Check to see if this has been executed within a sub directory of an
-    # Asterisk source tree.  This is required so that we can execute
-    # install and uninstall targets of the Asterisk Makefile in between
-    # tests.
-    if os.path.exists("../main/asterisk.c") is False:
-        print "***  ERROR  ***\n" \
-              "runtests has not been executed from within a\n" \
-              "subdirectory of an Asterisk source tree.  This\n" \
-              "is required for being able to uninstall and install\n" \
-              "Asterisk in between tests.\n" \
-              "***************\n"
-        return 1
-
     ast_version = AsteriskVersion(options.version)
 
     # Ensure that there's a trailing '/' in the test specified with -t

Modified: asterisk/team/qwell/CORS/tests/cdr/cdr-tests.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/qwell/CORS/tests/cdr/cdr-tests.py?view=diff&rev=3931&r1=3930&r2=3931
==============================================================================
--- asterisk/team/qwell/CORS/tests/cdr/cdr-tests.py (original)
+++ asterisk/team/qwell/CORS/tests/cdr/cdr-tests.py Fri Jul 19 11:06:48 2013
@@ -10,12 +10,61 @@
 
 import sys
 import logging
+import time
 
 sys.path.append("lib/python")
 from cdr import CDRModule
 from cdr import AsteriskCSVCDR
 
-logger = logging.getLogger(__name__)
+LOGGER = logging.getLogger(__name__)
+
+class SequenceOriginator(object):
+    ''' A class that performs an origination on each iteration of a SIPp
+    scenario.
+
+    Right now this is only used by the originate-cdr-disposition test; if it happens to
+    be more generically useful it can be relocated into another module.
+    '''
+
+    def __init__(self, module_config, test_object):
+        ''' Constructor '''
+
+        self.module_config = module_config
+        test_object.register_scenario_started_observer(self.scenario_started)
+        test_object.register_ami_observer(self.ami_connect)
+        self.ami = None
+        self.test_counter = 0
+
+    def ami_connect(self, ami):
+        ''' Callback for when AMI connects '''
+        self.ami = ami
+
+    def scenario_started(self, result):
+        ''' Handle origination on SIPp scenario start '''
+        LOGGER.info("Scenario started; originating new call")
+        self.originate_call()
+        self.test_counter += 1
+        return result
+
+    def originate_call(self):
+        ''' Originate a new call '''
+
+        def failure_absorber(reason):
+            ''' Absorb an exception thrown by an Originate failure '''
+            LOGGER.debug('Ignoring originate failure...')
+            return reason
+
+        if self.test_counter > (len(self.module_config) - 1):
+            LOGGER.debug('Ignoring scenario start; no more calls to originate')
+            return
+        originate_obj = self.module_config[self.test_counter]
+        defered = self.ami.originate(**originate_obj['parameters'])
+        ignore_failures = originate_obj.get('ignore-originate-failure') or False
+        if ignore_failures:
+            defered.addErrback(failure_absorber)
+
+
+
 
 class ForkCdrModuleBasic(CDRModule):
     ''' A class that adds some additional CDR checking on top of CDRModule
@@ -37,7 +86,7 @@
              self.test_object.ast[0].directories['astlogdir'], "cdrtest_local"))
 
         if int(cdr1[0].duration) < int(cdr1[1].duration):
-            logger.error("Fail: Original CDR duration shorter than forked")
+            LOGGER.error("Fail: Original CDR duration shorter than forked")
             self.test_object.set_passed(False)
         return
 
@@ -65,12 +114,12 @@
                  self.test_object.ast[0].directories['astlogdir'],
                  "cdrtest_local"))
 
-        logger.debug('Checking for missing fields')
+        LOGGER.debug('Checking for missing fields')
         for cdritem in cdr1:
             if (cdritem.duration is None or
                 cdritem.start is None or
                 cdritem.end is None):
-                logger.error("EPIC FAILURE: CDR record %s is missing one or " \
+                LOGGER.error("EPIC FAILURE: CDR record %s is missing one or " \
                              "more key fields. This should never be able to " \
                              "happen." % cdritem)
                 self.test_object.set_passed(False)
@@ -79,27 +128,29 @@
         # The dialplan is set up so that these two CDRs should each last at
         # least 4 seconds. Giving it wiggle room, we'll just say we want it to
         # be greater than 1 second.
-        logger.debug('Checking durations')
+        LOGGER.debug('Checking durations')
         for entry in self.entries_to_check:
             if (int(cdr1[entry].duration) <= 1):
-                logger.error("CDR at %d has duration less than one second" %
+                LOGGER.error("CDR at %d has duration less than one second" %
                              entry)
                 self.test_object.set_passed(False)
                 return
 
-        logger.debug('Checking start/end times for forked entries')
+        LOGGER.debug('Checking start/end times for forked entries')
         for i in range(len(self.entries_to_check) - 1):
-            end = time.strptime(cdr1[self.entries_to_check[i]].end, "%Y-%m-%d %H:%M:%S")
-            beg = time.strptime(cdr1[self.entries_to_check[i + 1]].start, "%Y-%m-%d %H:%M:%S")
+            end = time.strptime(cdr1[self.entries_to_check[i]].end,
+                "%Y-%m-%d %H:%M:%S")
+            beg = time.strptime(cdr1[self.entries_to_check[i + 1]].start,
+                "%Y-%m-%d %H:%M:%S")
 
             #check that the end of the first CDR occurred within 1 second of
             # the beginning of the second CDR
             if (abs(time.mktime(end) - time.mktime(beg)) > 1):
-                logger.error("Time discrepancy between end1 and start2: must " \
+                LOGGER.error("Time discrepancy between end1 and start2: must " \
                              "be one second or less.\n")
-                logger.error("Actual times: end cdr1 = %s   begin cdr2 = %s" %
+                LOGGER.error("Actual times: end cdr1 = %s   begin cdr2 = %s" %
                              (cdr1[self.entries_to_check[i]].end,
-                              cdr1[self_entries_to_check[i + 1]].start))
+                              cdr1[self.entries_to_check[i + 1]].start))
                 self.test_object.set_passed(False)
                 return
 

Modified: asterisk/team/qwell/CORS/tests/cdr/cdr_properties/blind-transfer-accountcode/sipp/call-then-blind-transfer.xml
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/qwell/CORS/tests/cdr/cdr_properties/blind-transfer-accountcode/sipp/call-then-blind-transfer.xml?view=diff&rev=3931&r1=3930&r2=3931
==============================================================================
--- asterisk/team/qwell/CORS/tests/cdr/cdr_properties/blind-transfer-accountcode/sipp/call-then-blind-transfer.xml (original)
+++ asterisk/team/qwell/CORS/tests/cdr/cdr_properties/blind-transfer-accountcode/sipp/call-then-blind-transfer.xml Fri Jul 19 11:06:48 2013
@@ -70,7 +70,7 @@
         Max-Forwards: 70
         Content-Length: 0
         Refer-To: <sip:[field3 line="[$line]"]@[remote_ip]:[remote_port]>
-        Reffered-By: <sip:[field0 line="[$line]"]@[local_ip]:[local_port]>
+        Referred-By: <sip:[field0 line="[$line]"]@[local_ip]:[local_port]>
 
         ]]>
     </send>
@@ -93,22 +93,4 @@
 
         ]]>
     </send>
-
-    <recv request="NOTIFY" optional="false" />
-
-    <send>
-        <![CDATA[
-
-        SIP/2.0 200 OK
-        [last_Via:]
-        [last_From:]
-        [last_To:]
-        [last_Call-ID:]
-        [last_CSeq:]
-        [last_Record-Route:]
-        Contact: sip:[field0 line="[$line]"]@[local_ip]:[local_port]
-        Content-Length: 0
-
-        ]]>
-    </send>
 </scenario>

Modified: asterisk/team/qwell/CORS/tests/cdr/cdr_properties/blind-transfer-accountcode/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/qwell/CORS/tests/cdr/cdr_properties/blind-transfer-accountcode/test-config.yaml?view=diff&rev=3931&r1=3930&r2=3931
==============================================================================
--- asterisk/team/qwell/CORS/tests/cdr/cdr_properties/blind-transfer-accountcode/test-config.yaml (original)
+++ asterisk/team/qwell/CORS/tests/cdr/cdr_properties/blind-transfer-accountcode/test-config.yaml Fri Jul 19 11:06:48 2013
@@ -2,7 +2,7 @@
     summary:     'Test account code propagation for SIP blind transfers.'
     description: |
         "This test ensures that when a channel with an account code, dials a
-        channel without and account code, then transfers the dialed channel to
+        channel without an account code, then transfers the dialed channel to
         another channel, the calling (and transferring) channel's account code
         is copied to the called channel and stored in the CDR record for the
         transfer."
@@ -12,8 +12,6 @@
 properties:
     minversion: '1.8.0.0'
     dependencies:
-        - app : 'bash'
-        - app : 'asttest'
         - sipp :
             version : 'v3.0'
             feature : 'TLS'
@@ -22,3 +20,134 @@
         - CDR
         - SIP
         - transfer
+
+test-modules:
+    test-object:
+        config-section: test-object-config
+        typename: 'sipp.SIPpTestCase'
+    modules:
+        -
+            config-section: 'cdr-config'
+            typename: 'cdr.CDRModule'
+
+test-object-config:
+    test-iterations:
+        -
+            # Register all 3 peers; names test1, -2, -3
+            scenarios:
+                - { 'key-args': {'scenario': 'register.xml', '-p': '5060',
+                    '-i': '127.0.0.2', '-inf': 'data.csv' },
+                    'ordered-args': [
+                        '-infindex', 'data.csv', '0',
+                        '-set', 'user', 'test1',
+                        '-set', 'file', 'data.csv'] }
+                - { 'key-args': {'scenario': 'register.xml', '-p': '5060',
+                    '-i': '127.0.0.3', '-inf': 'data.csv' },
+                    'ordered-args': [
+                        '-infindex', 'data.csv', '0',
+                        '-set', 'user', 'test2',
+                        '-set', 'file', 'data.csv'] }
+                - { 'key-args': {'scenario': 'register.xml', '-p': '5060',
+                    '-i': '127.0.0.4', '-inf': 'data.csv' },
+                    'ordered-args': [
+                        '-infindex', 'data.csv', '0',
+                        '-set', 'user', 'test3',
+                        '-set', 'file', 'data.csv'] }
+        -
+            scenarios:
+                - { 'key-args': {'scenario': 'wait-for-call.xml', '-p': '5060',
+                    '-i': '127.0.0.2', '-inf': 'data.csv' },
+                    'ordered-args': [
+                        '-infindex', 'data.csv', '0',
+                        '-set', 'user', 'test1',
+                        '-set', 'file', 'data.csv'] }
+                - { 'key-args': {'scenario': 'wait-for-call-do-hangup.xml', '-p': '5060',
+                    '-i': '127.0.0.3', '-inf': 'data.csv' },
+                    'ordered-args': [
+                        '-infindex', 'data.csv', '0',
+                        '-set', 'user', 'test2',
+                        '-set', 'file', 'data.csv'] }
+                - { 'key-args': {'scenario': 'call-then-blind-transfer.xml', '-p': '5060',
+                    '-i': '127.0.0.4', '-inf': 'data.csv' },
+                    'ordered-args': [
+                        '-infindex', 'data.csv', '0',
+                        '-set', 'user', 'test3',
+                        '-set', 'file', 'data.csv'] }
+            # Re-Register all 3 peers; names test3, -2, -1
+            scenarios:
+                - { 'key-args': {'scenario': 'register.xml', '-p': '5060',
+                    '-i': '127.0.0.2', '-inf': 'data.csv' },
+                    'ordered-args': [
+                        '-infindex', 'data.csv', '0',
+                        '-set', 'user', 'test3',
+                        '-set', 'file', 'data.csv'] }
+                - { 'key-args': {'scenario': 'register.xml', '-p': '5060',
+                    '-i': '127.0.0.3', '-inf': 'data.csv' },
+                    'ordered-args': [
+                        '-infindex', 'data.csv', '0',
+                        '-set', 'user', 'test2',
+                        '-set', 'file', 'data.csv'] }
+                - { 'key-args': {'scenario': 'register.xml', '-p': '5060',
+                    '-i': '127.0.0.4', '-inf': 'data.csv' },
+                    'ordered-args': [
+                        '-infindex', 'data.csv', '0',
+                        '-set', 'user', 'test1',
+                        '-set', 'file', 'data.csv'] }
+        -
+            scenarios:
+                - { 'key-args': {'scenario': 'wait-for-call.xml', '-p': '5060',
+                    '-i': '127.0.0.2', '-inf': 'data.csv' },
+                    'ordered-args': [
+                        '-infindex', 'data.csv', '0',
+                        '-set', 'user', 'test3',
+                        '-set', 'file', 'data.csv'] }
+                - { 'key-args': {'scenario': 'wait-for-call-do-hangup.xml', '-p': '5060',
+                    '-i': '127.0.0.3', '-inf': 'data.csv' },
+                    'ordered-args': [
+                        '-infindex', 'data.csv', '0',
+                        '-set', 'user', 'test2',
+                        '-set', 'file', 'data.csv'] }
+                - { 'key-args': {'scenario': 'call-then-blind-transfer.xml', '-p': '5060',
+                    '-i': '127.0.0.4', '-inf': 'data.csv' },
+                    'ordered-args': [
+                        '-infindex', 'data.csv', '0',
+                        '-set', 'user', 'test1',
+                        '-set', 'file', 'data.csv'] }
+
+cdr-config:
+    -
+        file: 'Master'
+        lines:
+            -
+                source: 'test1'
+                destination: 'test3'
+                accountcode: 'account1'
+                disposition: 'ANSWERED'
+                channel: 'SIP/test1-.*'
+                dchannel: 'SIP/test3-.*'
+            -
+                source: 'test3'
+                destination: 'test2'
+                accountcode: 'account1'
+                disposition: 'ANSWERED'
+                channel: 'SIP/test3-.*'
+                dchannel: 'SIP/test2-.*'
+    -
+        file: 'account1'
+        lines:
+            -
+                source: 'test1'
+                destination: 'test3'
+                accountcode: 'account1'
+                disposition: 'ANSWERED'
+                channel: 'SIP/test1-.*'
+                dchannel: 'SIP/test3-.*'
+            -
+                source: 'test3'
+                destination: 'test2'
+                accountcode: 'account1'
+                disposition: 'ANSWERED'
+                channel: 'SIP/test3-.*'
+                dchannel: 'SIP/test2-.*'
+
+

Modified: asterisk/team/qwell/CORS/tests/cdr/cdr_properties/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/qwell/CORS/tests/cdr/cdr_properties/tests.yaml?view=diff&rev=3931&r1=3930&r2=3931
==============================================================================
--- asterisk/team/qwell/CORS/tests/cdr/cdr_properties/tests.yaml (original)
+++ asterisk/team/qwell/CORS/tests/cdr/cdr_properties/tests.yaml Fri Jul 19 11:06:48 2013
@@ -2,5 +2,5 @@
 tests:
     - test: 'cdr_accountcode'
     - test: 'cdr_userfield'
-#    - test: 'blind-transfer-accountcode'
+    - test: 'blind-transfer-accountcode'
 

Modified: asterisk/team/qwell/CORS/tests/cdr/originate-cdr-disposition/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/qwell/CORS/tests/cdr/originate-cdr-disposition/test-config.yaml?view=diff&rev=3931&r1=3930&r2=3931
==============================================================================
--- asterisk/team/qwell/CORS/tests/cdr/originate-cdr-disposition/test-config.yaml (original)
+++ asterisk/team/qwell/CORS/tests/cdr/originate-cdr-disposition/test-config.yaml Fri Jul 19 11:06:48 2013
@@ -12,11 +12,117 @@
 properties:
     minversion: '1.8.0.0'
     dependencies:
-        - app : 'bash'
-        - app : 'asttest'
         - sipp :
             version : 'v3.0'
         - asterisk : 'cdr_csv'
     tags:
         - SIP
-        - CDR
+        - CDR
+
+test-modules:
+    add-to-search-path:
+        -
+            'tests/cdr'
+    test-object:
+        config-section: test-object-config
+        typename: 'sipp.SIPpTestCase'
+    modules:
+        -
+            config-section: 'sequence-originator'
+            typename: 'cdr-tests.SequenceOriginator'
+        -
+            config-section: 'cdr-config'
+            typename: 'cdr.CDRModule'
+
+cdr-config:
+    -
+        file: 'Master'
+        lines:
+            -
+                disposition: 'ANSWERED'
+                channel: 'SIP/test1-.*'
+                dchannel: ''
+            -
+                disposition: 'BUSY'
+                channel: 'SIP/test1-.*'
+                dchannel: ''
+            -
+                disposition: 'FAILED'
+                channel: 'SIP/test1-.*'
+                dchannel: ''
+            -
+                disposition: 'NO ANSWER'
+                channel: 'SIP/test1-.*'
+                dchannel: ''
+            -
+                disposition: 'NO ANSWER'
+                channel: 'SIP/test1-.*'
+                dchannel: 'SIP/test2-.*'
+
+sequence-originator:
+    -
+        parameters: { channel: 'sip/test1', context: 'default', exten: 'wait', priority: '1' }
+        ignore-originate-failure: 'no'
+    -
+        parameters: { channel: 'sip/test1', context: 'default', exten: 'wait', priority: '1' }
+        ignore-originate-failure: 'no'
+    -
+        parameters: { channel: 'sip/test1', context: 'default', exten: 'wait', priority: '1' }
+        ignore-originate-failure: 'no'
+    -
+        parameters: { channel: 'sip/test1', context: 'default', exten: 'wait', priority: '1', timeout: 1 }
+        ignore-originate-failure: 'yes'
+    -
+        parameters: { channel: 'sip/test1', context: 'default', exten: 'dial', priority: '1' }
+        ignore-originate-failure: 'yes'
+
+
+test-object-config:
+    test-iterations:
+        -
+            scenarios:
+                - { 'key-args': {'scenario': 'wait-for-call.xml', '-p': '5060',
+                    '-i': '127.0.0.2', '-inf': 'data.csv' },
+                    'ordered-args': [
+                        '-infindex', 'data.csv', '0',
+                        '-set', 'user', 'test1',
+                        '-set', 'file', 'data.csv'] }
+        -
+            scenarios:
+                - { 'key-args': {'scenario': 'wait-for-call-busy.xml', '-p': '5060',
+                    '-i': '127.0.0.2', '-inf': 'data.csv' },
+                    'ordered-args': [
+                        '-infindex', 'data.csv', '0',
+                        '-set', 'user', 'test1',
+                        '-set', 'file', 'data.csv'] }
+        -
+            scenarios:
+                - { 'key-args': {'scenario': 'wait-for-call-congestion.xml', '-p': '5060',
+                    '-i': '127.0.0.2', '-inf': 'data.csv' },
+                    'ordered-args': [
+                        '-infindex', 'data.csv', '0',
+                        '-set', 'user', 'test1',
+                        '-set', 'file', 'data.csv'] }
+        -
+            scenarios:
+                - { 'key-args': {'scenario': 'wait-for-call-timeout.xml', '-p': '5060',
+                    '-i': '127.0.0.2', '-inf': 'data.csv' },
+                    'ordered-args': [
+                        '-infindex', 'data.csv', '0',
+                        '-set', 'user', 'test1',
+                        '-set', 'file', 'data.csv'] }
+        -
+            scenarios:
+                - { 'key-args': {'scenario': 'wait-for-call.xml', '-p': '5060',
+                    '-i': '127.0.0.2', '-inf': 'data.csv' },
+                    'ordered-args': [
+                        '-infindex', 'data.csv', '0',
+                        '-set', 'user', 'test1',
+                        '-set', 'file', 'data.csv'] }
+                - { 'key-args': {'scenario': 'wait-for-call-timeout.xml', '-p': '5060',
+                    '-i': '127.0.0.3', '-inf': 'data.csv' },
+                    'ordered-args': [
+                        '-infindex', 'data.csv', '0',
+                        '-set', 'user', 'test2',
+                        '-set', 'file', 'data.csv'] }
+

Modified: asterisk/team/qwell/CORS/tests/channels/SIP/sip_hold/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/qwell/CORS/tests/channels/SIP/sip_hold/run-test?view=diff&rev=3931&r1=3930&r2=3931
==============================================================================
--- asterisk/team/qwell/CORS/tests/channels/SIP/sip_hold/run-test (original)
+++ asterisk/team/qwell/CORS/tests/channels/SIP/sip_hold/run-test Fri Jul 19 11:06:48 2013
@@ -19,14 +19,14 @@
 from twisted.internet import reactor
 
 logger = logging.getLogger(__name__)
-TEST_DIR = os.path.dirname(os.path.realpath(__file__))
-INJECT_FILE_BYPASS = TEST_DIR + "/sipp/inject_bypass.csv"
-INJECT_FILE_BRIDGE = TEST_DIR + "/sipp/inject_bridge.csv"
+INJECT_FILE_BYPASS = "inject_bypass.csv"
+INJECT_FILE_BRIDGE = "inject_bridge.csv"
 
 class SIPHold(TestCase):
     def __init__(self):
         TestCase.__init__(self)
         self.create_asterisk()
+
         self.sipp_phone_a_scenarios = [{'scenario':'phone_A.xml','-i':'127.0.0.2','-p':'5060','-inf':INJECT_FILE_BYPASS},
             {'scenario':'phone_A.xml','-i':'127.0.0.2','-p':'5060','-inf':INJECT_FILE_BYPASS},
             {'scenario':'phone_A.xml','-i':'127.0.0.2','-p':'5060','-inf':INJECT_FILE_BYPASS},
@@ -73,8 +73,8 @@
             logger.info("All scenarios executed")
             return
 
-        sipp_a = SIPpScenario(TEST_DIR, self.sipp_phone_a_scenarios[self.__test_counter])
-        sipp_b = SIPpScenario(TEST_DIR, self.sipp_phone_b_scenarios[self.__test_counter])
+        sipp_a = SIPpScenario(self.test_name, self.sipp_phone_a_scenarios[self.__test_counter])
+        sipp_b = SIPpScenario(self.test_name, self.sipp_phone_b_scenarios[self.__test_counter])
 
         # Start up the listener first - Phone A calls Phone B
         self.__a_finished = False

Modified: asterisk/team/qwell/CORS/tests/channels/local/local_app/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/qwell/CORS/tests/channels/local/local_app/test-config.yaml?view=diff&rev=3931&r1=3930&r2=3931
==============================================================================
--- asterisk/team/qwell/CORS/tests/channels/local/local_app/test-config.yaml (original)
+++ asterisk/team/qwell/CORS/tests/channels/local/local_app/test-config.yaml Fri Jul 19 11:06:48 2013
@@ -11,6 +11,11 @@
         config-section: test-object-config
         typename: 'SimpleTestCase.SimpleTestCase'
     modules:
+        -
+            minversion: '1.8.0.0'
+            maxversion: '12.0.0'
+            config-section: ami-config-pre-12
+            typename: 'ami.AMIEventModule'
         -
             minversion: '12.0.0'
             config-section: ami-config-12
@@ -32,6 +37,19 @@
             exten: 'dial_foo'
             context: 'default'
             priority: '1'
+
+ami-config-pre-12:
+    -
+        type: 'headermatch'
+        conditions:
+            match:
+                Event: 'Masquerade'
+        requirements:
+            match:
+                Clone: 'SIP/asterisk-.*'
+                Original: 'Local/dial_bar at default-.*'
+                OriginalState: 'Up'
+        count: '0'
 
 ami-config-12:
     -

Modified: asterisk/team/qwell/CORS/tests/channels/local/local_call/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/qwell/CORS/tests/channels/local/local_call/test-config.yaml?view=diff&rev=3931&r1=3930&r2=3931
==============================================================================
--- asterisk/team/qwell/CORS/tests/channels/local/local_call/test-config.yaml (original)
+++ asterisk/team/qwell/CORS/tests/channels/local/local_call/test-config.yaml Fri Jul 19 11:06:48 2013
@@ -23,6 +23,11 @@
         typename: 'SimpleTestCase.SimpleTestCase'
     modules:
         -
+            minversion: '1.8.0.0'
+            maxversion: '12.0.0'
+            config-section: ami-config-pre-12
+            typename: 'ami.AMIEventModule'
+        -
             minversion: '12.0.0'
             config-section: ami-config-12
             typename: 'ami.AMIEventModule'
@@ -40,6 +45,19 @@
             exten: 'dial_foo'
             context: 'default'
             priority: '1'
+
+ami-config-pre-12:
+    -
+        type: 'headermatch'
+        conditions:
+            match:
+                Event: 'Masquerade'
+        requirements:
+            match:
+                Clone: 'SIP/asterisk-.*'
+                Original: 'Local/dial_bar at default-.*'
+                OriginalState: 'Up'
+        count: '1'
 
 ami-config-12:
     -

Modified: asterisk/team/qwell/CORS/tests/rest_api/authentication/configs/ast1/ari.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/qwell/CORS/tests/rest_api/authentication/configs/ast1/ari.conf?view=diff&rev=3931&r1=3930&r2=3931
==============================================================================
--- asterisk/team/qwell/CORS/tests/rest_api/authentication/configs/ast1/ari.conf (original)
+++ asterisk/team/qwell/CORS/tests/rest_api/authentication/configs/ast1/ari.conf Fri Jul 19 11:06:48 2013
@@ -1,14 +1,17 @@
 [general]
 enabled = yes
 
-[user-ro]
+[ro]
+type = user
 read_only = yes
 password = ro-pass
 
-[user-rw]
+[rw]
+type = user
 password = rw-pass
 
-[user-crypt]
+[crypt]
+type = user
 ; password = q
 password_format = crypt
 password = $6$Wwpq0WjHUpbzGlWH$Yl0iVJDUzMsG25g5b3gTftVvhMerlO7clXAJidxgmx26cLOOyjcdiSk8PkDJKFGA2Oj0ZN9J.5u3/wkbEwYCd/

Modified: asterisk/team/qwell/CORS/tests/rest_api/authentication/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/qwell/CORS/tests/rest_api/authentication/run-test?view=diff&rev=3931&r1=3930&r2=3931
==============================================================================

[... 24 lines stripped ...]



More information about the asterisk-commits mailing list