Review Board 1.7.16

Tests for new AMI Bridging commands

Review Request #2975 - Created Oct. 29, 2013 and updated

Scott Griepentrog
12, trunk
Test proving basic functionality of new AMI commands added in

Also: disabled failing bridge_actions test.

Posted (Nov. 5, 2013, 4:19 p.m.)


Whoops - I didn't write this :-)
/asterisk/trunk/tests/manager/bridge/destroy/ (Diff revision 1)
So, a large chunk of this is exactly the same from test to test. For the most part, the part of this that is not the same between tests deals with what specific AMI action is executed once the channels that have been Originated are Bridged.

I'd suggest modifying this by doing the following:

(1) Refactor out the common code into a single pluggable module. It should spawn the channels, wait for them to hangup, and end the test. This python file can be stored in the lib/python/asterisk directory. It could go into either the BridgeTestCase module, or into a new, separate module

This class should have a single virtual method that is called from _bridge_enter_handler when len(self.bridge_channel[bridgeid]) == 2. This individual tests will provide an implementation of that function.

(2) Each individual test should derive a class from BridgeFeature that only implements the specific function. That function should execute the AMI action.

I fully expect that this won't cover *all* of the tests in here, but I think we should strive to minimize the amount of duplicate code here and provide some basic functionality that is useful for any AMI action that manipulates a bridge.
So... I ended up fixing the bridge_actions test :-)  It's rather poorly named - it actually verifies the BridgeInfo and BridgeList AMI actions.

You can, after you've committed this, move that test under your bridge directory. runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to