[asterisk-dev] [Code Review] 2975: Tests for new AMI Bridging commands

Matt Jordan reviewboard at asterisk.org
Tue Nov 5 16:19:22 CST 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2975/#review10125
-----------------------------------------------------------



/asterisk/trunk/tests/manager/bridge/destroy/manage_bridge.py
<https://reviewboard.asterisk.org/r/2975/#comment19397>

    Whoops - I didn't write this :-)



/asterisk/trunk/tests/manager/bridge/destroy/manage_bridge.py
<https://reviewboard.asterisk.org/r/2975/#comment19398>

    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 bridge.py.
    
    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.



/asterisk/trunk/tests/manager/tests.yaml
<https://reviewboard.asterisk.org/r/2975/#comment19396>

    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.


- Matt Jordan


On Oct. 29, 2013, 9:47 p.m., Scott Griepentrog wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2975/
> -----------------------------------------------------------
> 
> (Updated Oct. 29, 2013, 9:47 p.m.)
> 
> 
> Review request for Asterisk Developers and Matt Jordan.
> 
> 
> Bugs: ASTERISK-22356
>     https://issues.asterisk.org/jira/browse/ASTERISK-22356
> 
> 
> Repository: testsuite
> 
> 
> Description
> -------
> 
> Test proving basic functionality of new AMI commands added in https://reviewboard.asterisk.org/r/2973/
> 
> Also: disabled failing bridge_actions test.
> 
> 
> Diffs
> -----
> 
>   /asterisk/trunk/tests/manager/tests.yaml 4304 
>   /asterisk/trunk/tests/manager/bridge/unsuspend/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/manager/bridge/unsuspend/manage_bridge.py PRE-CREATION 
>   /asterisk/trunk/tests/manager/bridge/unsuspend/configs/ast1/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/manager/bridge/tests.yaml PRE-CREATION 
>   /asterisk/trunk/tests/manager/bridge/technology/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/manager/bridge/technology/manage_bridge.py PRE-CREATION 
>   /asterisk/trunk/tests/manager/bridge/technology/configs/ast1/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/manager/bridge/suspend/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/manager/bridge/suspend/manage_bridge.py PRE-CREATION 
>   /asterisk/trunk/tests/manager/bridge/suspend/configs/ast1/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/manager/bridge/kickchannel/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/manager/bridge/kickchannel/manage_bridge.py PRE-CREATION 
>   /asterisk/trunk/tests/manager/bridge/kickchannel/configs/ast1/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/manager/bridge/kickbridge/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/manager/bridge/kickbridge/manage_bridge.py PRE-CREATION 
>   /asterisk/trunk/tests/manager/bridge/kickbridge/configs/ast1/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/manager/bridge/destroy/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/manager/bridge/destroy/manage_bridge.py PRE-CREATION 
>   /asterisk/trunk/tests/manager/bridge/destroy/configs/ast1/extensions.conf PRE-CREATION 
> 
> Diff: https://reviewboard.asterisk.org/r/2975/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Scott Griepentrog
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20131105/c00dfe51/attachment-0001.html>


More information about the asterisk-dev mailing list