[asterisk-dev] [Code Review] Make TestSuite Asterisk class create and install config files after instantiation

Matthew Nicholson reviewboard at asterisk.org
Tue Nov 8 16:11:43 CST 2011


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

Ship it!



/asterisk/trunk/lib/python/asterisk/asterisk.py
<https://reviewboard.asterisk.org/r/1571/#comment8917>

    This check isn't necessary, it is done in __make_directory_structure()


Beyond that, this looks ok to me.

- Matthew


On Nov. 8, 2011, 8:29 a.m., mjordan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1571/
> -----------------------------------------------------------
> 
> (Updated Nov. 8, 2011, 8:29 a.m.)
> 
> 
> Review request for Asterisk Developers, Jason Parker, Matthew Nicholson, and jrose.
> 
> 
> Summary
> -------
> 
> The Asterisk class, which wraps and manages an instance of Asterisk for the TestSuite, previously would make the configuration file directory structure and install the configuration files during construction.  This had several negative impacts, including:
> 1. Creating 'dummy' directories in the tmp directory that had no relation to the currently executing test
> 2. Making directories and installing configuration files when the location of Asterisk configuration files was all that was needed
> 
> This patch modifies the class to install the configuration files only when install_configs is called.  This was previously called from the constructor.  If install_configs is called for the non-default testsuite directory, the default configuration files are installed automatically once (this prevents the majority of tests from having to be modified).  If install_configs is not called prior to start_asterisk, then the default testsuite configuration files are installed.
> 
> During object creation, the location of the Asterisk directories, the base directory structure, and the 'numbered' instance of Asterisk for that test are all defined so that they can be used by an individual test.
> 
> 
> This addresses bug ASTERISK-18823.
>     https://issues.asterisk.org/jira/browse/ASTERISK-18823
> 
> 
> Diffs
> -----
> 
>   /asterisk/trunk/lib/python/asterisk/TestCase.py 2507 
>   /asterisk/trunk/lib/python/asterisk/asterisk.py 2556 
>   /asterisk/trunk/lib/python/asterisk/voicemail.py 2628 
> 
> Diff: https://reviewboard.asterisk.org/r/1571/diff
> 
> 
> Testing
> -------
> 
> Executed by the testsuite.  Ran using the --test option and without the --test option.  Tested both tests that inherit from TestCase, as well as those that do not.
> 
> 
> Thanks,
> 
> mjordan
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20111108/8131ff67/attachment-0001.htm>


More information about the asterisk-dev mailing list