[asterisk-dev] [Code Review] Make TestSuite Asterisk class create and install config files after instantiation
mjordan
reviewboard at asterisk.org
Tue Nov 8 08:29:42 CST 2011
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1571/
-----------------------------------------------------------
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/e0b5cb58/attachment.htm>
More information about the asterisk-dev
mailing list