[asterisk-commits] mmichelson: testsuite/asterisk/trunk r3571 - in /asterisk/trunk: ./ configs/b...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Dec 12 09:58:21 CST 2012
Author: mmichelson
Date: Wed Dec 12 09:58:16 2012
New Revision: 3571
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=3571
Log:
Add Bridging test object and initial set of bridge tests.
This adds a new test object intended to be used for bridging-related
tests. There are several tests being included that make use of this
test object.
The tests included are
* simple_bridge: A baseline test to ensure that a call can get set up,
that audio flows freely, that identities are correct, that a hangup
gets detected, and that CDRs and CELs are correct.
* disconnect: Tests everything from simple_bridge but ensures that the
disconnect feature works as expected. In other words, when someone who
should be able to disconnect with a feature code presses the feature
code, the call disconnects. Otherwise, the call continues.
* automon: Like the disconnect test, but it tests the automon feature
instead. Care is not given to whether the recording actually works, but
rather that the bridge detects the feature code and takes appropriate
action.
* automixmon: Like the automon test but using the automixmon feature instead.
* atxfer: Test that the attended transfer feature code is detected and applied
as expected. This does not attempt to actually complete an attended transfer.
In-depth transfer tests will be handled in future test commits.
* blindxfer: Just like the atxfer test except using a blind transfer.
Review: https://reviewboard.digium.com/r/2065
Review: https://reviewboard.digium.com/r/2067
Added:
asterisk/trunk/configs/bridge/
- copied from r3569, asterisk/team/mmichelson/bridge-tests/configs/bridge/
asterisk/trunk/configs/bridge/ast1/
- copied from r3569, asterisk/team/mmichelson/bridge-tests/configs/bridge/ast1/
asterisk/trunk/configs/bridge/ast1/iax.conf
- copied unchanged from r3569, asterisk/team/mmichelson/bridge-tests/configs/bridge/ast1/iax.conf
asterisk/trunk/configs/bridge/ast1/sip.conf
- copied unchanged from r3569, asterisk/team/mmichelson/bridge-tests/configs/bridge/ast1/sip.conf
asterisk/trunk/configs/bridge/ast2/
- copied from r3569, asterisk/team/mmichelson/bridge-tests/configs/bridge/ast2/
asterisk/trunk/configs/bridge/ast2/extensions.conf
- copied unchanged from r3569, asterisk/team/mmichelson/bridge-tests/configs/bridge/ast2/extensions.conf
asterisk/trunk/configs/bridge/ast2/iax.conf
- copied unchanged from r3569, asterisk/team/mmichelson/bridge-tests/configs/bridge/ast2/iax.conf
asterisk/trunk/configs/bridge/ast2/sip.conf
- copied unchanged from r3569, asterisk/team/mmichelson/bridge-tests/configs/bridge/ast2/sip.conf
asterisk/trunk/configs/bridge/ast3/
- copied from r3569, asterisk/team/mmichelson/bridge-tests/configs/bridge/ast3/
asterisk/trunk/configs/bridge/ast3/extensions.conf
- copied unchanged from r3569, asterisk/team/mmichelson/bridge-tests/configs/bridge/ast3/extensions.conf
asterisk/trunk/configs/bridge/ast3/iax.conf
- copied unchanged from r3569, asterisk/team/mmichelson/bridge-tests/configs/bridge/ast3/iax.conf
asterisk/trunk/configs/bridge/ast3/sip.conf
- copied unchanged from r3569, asterisk/team/mmichelson/bridge-tests/configs/bridge/ast3/sip.conf
asterisk/trunk/lib/python/asterisk/BridgeTestCase.py
- copied unchanged from r3569, asterisk/team/mmichelson/bridge-tests/lib/python/asterisk/BridgeTestCase.py
asterisk/trunk/sample-yaml/bridge-config.yaml.sample
- copied unchanged from r3569, asterisk/team/mmichelson/bridge-tests/sample-yaml/bridge-config.yaml.sample
asterisk/trunk/tests/bridge/
- copied from r3569, asterisk/team/mmichelson/bridge-tests/tests/bridge/
asterisk/trunk/tests/bridge/atxfer/
- copied from r3569, asterisk/team/mmichelson/bridge-tests/tests/bridge/atxfer/
asterisk/trunk/tests/bridge/atxfer/configs/
- copied from r3569, asterisk/team/mmichelson/bridge-tests/tests/bridge/atxfer/configs/
asterisk/trunk/tests/bridge/atxfer/configs/ast1/
- copied from r3569, asterisk/team/mmichelson/bridge-tests/tests/bridge/atxfer/configs/ast1/
asterisk/trunk/tests/bridge/atxfer/configs/ast1/extensions.conf
- copied unchanged from r3569, asterisk/team/mmichelson/bridge-tests/tests/bridge/atxfer/configs/ast1/extensions.conf
asterisk/trunk/tests/bridge/atxfer/test-config.yaml
- copied unchanged from r3569, asterisk/team/mmichelson/bridge-tests/tests/bridge/atxfer/test-config.yaml
asterisk/trunk/tests/bridge/automixmon/
- copied from r3569, asterisk/team/mmichelson/bridge-tests/tests/bridge/automixmon/
asterisk/trunk/tests/bridge/automixmon/configs/
- copied from r3569, asterisk/team/mmichelson/bridge-tests/tests/bridge/automixmon/configs/
asterisk/trunk/tests/bridge/automixmon/configs/ast1/
- copied from r3569, asterisk/team/mmichelson/bridge-tests/tests/bridge/automixmon/configs/ast1/
asterisk/trunk/tests/bridge/automixmon/configs/ast1/extensions.conf
- copied unchanged from r3569, asterisk/team/mmichelson/bridge-tests/tests/bridge/automixmon/configs/ast1/extensions.conf
asterisk/trunk/tests/bridge/automixmon/test-config.yaml
- copied unchanged from r3569, asterisk/team/mmichelson/bridge-tests/tests/bridge/automixmon/test-config.yaml
asterisk/trunk/tests/bridge/automon/
- copied from r3569, asterisk/team/mmichelson/bridge-tests/tests/bridge/automon/
asterisk/trunk/tests/bridge/automon/configs/
- copied from r3569, asterisk/team/mmichelson/bridge-tests/tests/bridge/automon/configs/
asterisk/trunk/tests/bridge/automon/configs/ast1/
- copied from r3569, asterisk/team/mmichelson/bridge-tests/tests/bridge/automon/configs/ast1/
asterisk/trunk/tests/bridge/automon/configs/ast1/extensions.conf
- copied unchanged from r3569, asterisk/team/mmichelson/bridge-tests/tests/bridge/automon/configs/ast1/extensions.conf
asterisk/trunk/tests/bridge/automon/test-config.yaml
- copied unchanged from r3569, asterisk/team/mmichelson/bridge-tests/tests/bridge/automon/test-config.yaml
asterisk/trunk/tests/bridge/blindxfer/
- copied from r3569, asterisk/team/mmichelson/bridge-tests/tests/bridge/blindxfer/
asterisk/trunk/tests/bridge/blindxfer/configs/
- copied from r3569, asterisk/team/mmichelson/bridge-tests/tests/bridge/blindxfer/configs/
asterisk/trunk/tests/bridge/blindxfer/configs/ast1/
- copied from r3569, asterisk/team/mmichelson/bridge-tests/tests/bridge/blindxfer/configs/ast1/
asterisk/trunk/tests/bridge/blindxfer/configs/ast1/extensions.conf
- copied unchanged from r3569, asterisk/team/mmichelson/bridge-tests/tests/bridge/blindxfer/configs/ast1/extensions.conf
asterisk/trunk/tests/bridge/blindxfer/test-config.yaml
- copied unchanged from r3569, asterisk/team/mmichelson/bridge-tests/tests/bridge/blindxfer/test-config.yaml
asterisk/trunk/tests/bridge/connected_line_update/
- copied from r3569, asterisk/team/mmichelson/bridge-tests/tests/bridge/connected_line_update/
asterisk/trunk/tests/bridge/disconnect/
- copied from r3569, asterisk/team/mmichelson/bridge-tests/tests/bridge/disconnect/
asterisk/trunk/tests/bridge/disconnect/configs/
- copied from r3569, asterisk/team/mmichelson/bridge-tests/tests/bridge/disconnect/configs/
asterisk/trunk/tests/bridge/disconnect/configs/ast1/
- copied from r3569, asterisk/team/mmichelson/bridge-tests/tests/bridge/disconnect/configs/ast1/
asterisk/trunk/tests/bridge/disconnect/configs/ast1/extensions.conf
- copied unchanged from r3569, asterisk/team/mmichelson/bridge-tests/tests/bridge/disconnect/configs/ast1/extensions.conf
asterisk/trunk/tests/bridge/disconnect/test-config.yaml
- copied unchanged from r3569, asterisk/team/mmichelson/bridge-tests/tests/bridge/disconnect/test-config.yaml
asterisk/trunk/tests/bridge/simple_bridge/
- copied from r3569, asterisk/team/mmichelson/bridge-tests/tests/bridge/simple_bridge/
asterisk/trunk/tests/bridge/simple_bridge/configs/
- copied from r3569, asterisk/team/mmichelson/bridge-tests/tests/bridge/simple_bridge/configs/
asterisk/trunk/tests/bridge/simple_bridge/configs/ast1/
- copied from r3569, asterisk/team/mmichelson/bridge-tests/tests/bridge/simple_bridge/configs/ast1/
asterisk/trunk/tests/bridge/simple_bridge/configs/ast1/extensions.conf
- copied unchanged from r3569, asterisk/team/mmichelson/bridge-tests/tests/bridge/simple_bridge/configs/ast1/extensions.conf
asterisk/trunk/tests/bridge/simple_bridge/test-config.yaml
- copied unchanged from r3569, asterisk/team/mmichelson/bridge-tests/tests/bridge/simple_bridge/test-config.yaml
asterisk/trunk/tests/bridge/tests.yaml
- copied unchanged from r3569, asterisk/team/mmichelson/bridge-tests/tests/bridge/tests.yaml
Modified:
asterisk/trunk/ (props changed)
asterisk/trunk/lib/python/asterisk/TestCase.py
asterisk/trunk/lib/python/asterisk/asterisk.py
asterisk/trunk/sample-yaml/ami-config.yaml.sample
asterisk/trunk/tests/tests.yaml
Propchange: asterisk/trunk/
------------------------------------------------------------------------------
automerge = *
Propchange: asterisk/trunk/
------------------------------------------------------------------------------
automerge-email = mmichelson at digium.com
Propchange: asterisk/trunk/
------------------------------------------------------------------------------
svnmerge-integrated = /asterisk/trunk:1-3568
Modified: asterisk/trunk/lib/python/asterisk/TestCase.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/lib/python/asterisk/TestCase.py?view=diff&rev=3571&r1=3570&r2=3571
==============================================================================
--- asterisk/trunk/lib/python/asterisk/TestCase.py (original)
+++ asterisk/trunk/lib/python/asterisk/TestCase.py Wed Dec 12 09:58:16 2012
@@ -138,7 +138,7 @@
logger.warning("Unsupported type [%s] with related condition %s" % (c[1], c[2]))
self.testConditionController.register_observer(self.handle_condition_failure, 'Failed')
- def create_asterisk(self, count=1):
+ def create_asterisk(self, count=1, base_configs_path=None):
"""
Create n instances of Asterisk
@@ -146,12 +146,21 @@
count -- the number of Asterisk instances to create. Each Asterisk instance
will be hosted on 127.0.0.x, where x is the 1-based index of the instance
created
+
+ base_configs_path -- provides common configuration for Asterisk
+ instances to use. This is useful for certain test types that use the
+ same configuration all the time. This configuration can be overwritten
+ by individual tests, however.
"""
for c in range(count):
logger.info("Creating Asterisk instance %d" % (c + 1))
host = "127.0.0.%d" % (c + 1)
self.ast.append(Asterisk(base=self.base, host=host))
+ """ If a base configuration for this Asterisk instance has been
+ provided, install it first"""
+ if base_configs_path:
+ self.ast[c].install_configs("%s/ast%d" % (base_configs_path, c + 1))
""" Copy test specific config files """
self.ast[c].install_configs("%s/configs/ast%d" %
(self.test_name, c + 1))
Modified: asterisk/trunk/lib/python/asterisk/asterisk.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/lib/python/asterisk/asterisk.py?view=diff&rev=3571&r1=3570&r2=3571
==============================================================================
--- asterisk/trunk/lib/python/asterisk/asterisk.py (original)
+++ asterisk/trunk/lib/python/asterisk/asterisk.py Wed Dec 12 09:58:16 2012
@@ -440,6 +440,9 @@
self.install_configs("%s/configs" % os.getcwd())
self.__configs_installed = True
+ if not os.access(cfg_path, os.F_OK):
+ return
+
for f in os.listdir(cfg_path):
target = "%s/%s" % (cfg_path, f)
if os.path.isfile(target):
Modified: asterisk/trunk/sample-yaml/ami-config.yaml.sample
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/sample-yaml/ami-config.yaml.sample?view=diff&rev=3571&r1=3570&r2=3571
==============================================================================
--- asterisk/trunk/sample-yaml/ami-config.yaml.sample (original)
+++ asterisk/trunk/sample-yaml/ami-config.yaml.sample Wed Dec 12 09:58:16 2012
@@ -86,7 +86,7 @@
# Normally, this should probably be the number of requirements specified
# above.
count: '2'
- -
+ -
# The "callback" type indicates that when event conditions are fulfilled
# A callback should be called into. This is useful if pass/fail conditions
# depend on more than just having specific headers match what is expected.
Modified: asterisk/trunk/tests/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/tests.yaml?view=diff&rev=3571&r1=3570&r2=3571
==============================================================================
--- asterisk/trunk/tests/tests.yaml (original)
+++ asterisk/trunk/tests/tests.yaml Wed Dec 12 09:58:16 2012
@@ -25,3 +25,4 @@
- dir: 'connected_line'
- dir: 'redirecting'
- test: 'cause_answered_elsewhere'
+ - dir: 'bridge'
More information about the asterisk-commits
mailing list