[asterisk-dev] [Code Review]: Remove OptionParser from tests

Paul Belanger reviewboard at asterisk.org
Fri Aug 26 12:40:57 CDT 2011



> On Aug. 26, 2011, 12:25 p.m., mjordan wrote:
> > Looks good.  I'll merge this into the logging stuff once this is in trunk and post it up for review.  The comments below will help if the test has something seriously wrong with it, but aren't strictly necessary.

Yup, like I said.  If you and jrose move your tests into a group branch, I can help update them.


> On Aug. 26, 2011, 12:25 p.m., mjordan wrote:
> > asterisk/trunk/tests/channels/SIP/sip_tls_call/run-test, line 74
> > <https://reviewboard.asterisk.org/r/1386/diff/1/?file=19249#file19249line74>
> >
> >     If you feel like it, since you put the check previously to prevent other AMI instances from spawning an originate, you may want to also put an error callback on the deferred object in case the originate fails.

I agree, however I'll leave them out of this patch.  I'll address it shortly.


> On Aug. 26, 2011, 12:25 p.m., mjordan wrote:
> > asterisk/trunk/tests/chanspy/chanspy_barge/run-test, line 155
> > <https://reviewboard.asterisk.org/r/1386/diff/1/?file=19250#file19250line155>
> >
> >     Error callback here too

same


> On Aug. 26, 2011, 12:25 p.m., mjordan wrote:
> > asterisk/trunk/tests/chanspy/chanspy_barge/run-test, line 161
> > <https://reviewboard.asterisk.org/r/1386/diff/1/?file=19250#file19250line161>
> >
> >     Error callback here too

same


- Paul


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


On Aug. 26, 2011, 12:38 p.m., Paul Belanger wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1386/
> -----------------------------------------------------------
> 
> (Updated Aug. 26, 2011, 12:38 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> This patch removes the OptionParser logic from all tests, and fixes the following:
> 
> A) It is deprecated in python 2.7
> 2) Is a sloppy way to pass data into a test
> 3) Not even needed.
> 
> I've also added cli_aliases.conf file to fix the logic around ast_version.
> 
> 
> Diffs
> -----
> 
>   asterisk/trunk/tests/chanspy/chanspy_w_mixmonitor/run-test 1959 
>   asterisk/trunk/tests/chanspy/chanspy_barge/run-test 1959 
>   asterisk/trunk/tests/channels/SIP/sip_one_legged_transfer/run-test 1959 
>   asterisk/trunk/tests/channels/SIP/sip_one_legged_transfer_v6/run-test 1959 
>   asterisk/trunk/tests/channels/SIP/sip_register/run-test 1959 
>   asterisk/trunk/tests/channels/SIP/sip_srtp/run-test 1959 
>   asterisk/trunk/tests/channels/SIP/sip_tls_call/run-test 1959 
>   asterisk/trunk/tests/channels/SIP/sip_attended_transfer_v6/run-test 1959 
>   asterisk/trunk/tests/channels/SIP/sip_attended_transfer_tcp/run-test 1959 
>   asterisk/trunk/tests/channels/SIP/sip_attended_transfer/run-test 1959 
>   asterisk/trunk/tests/channels/SIP/options/run-test 1959 
>   asterisk/trunk/tests/channels/SIP/secure_bridge_media/run-test 1959 
>   asterisk/trunk/tests/channels/SIP/noload_res_srtp_attempt_srtp/run-test 1959 
>   asterisk/trunk/tests/channels/SIP/message_unauth/run-test 1959 
>   asterisk/trunk/tests/channels/SIP/noload_res_srtp/run-test 1959 
>   asterisk/trunk/tests/channels/SIP/message_disabled/run-test 1959 
>   asterisk/trunk/tests/channels/SIP/message_from_call/run-test 1959 
>   asterisk/trunk/tests/callparking/run-test 1959 
>   asterisk/trunk/tests/channels/SIP/message_auth/run-test 1959 
>   asterisk/trunk/asttest/asttest.c 1959 
>   asterisk/trunk/configs/cli_aliases.conf PRE-CREATION 
>   asterisk/trunk/lib/python/asterisk/TestCase.py 1959 
>   asterisk/trunk/runtests.py 1959 
>   asterisk/trunk/tests/apps/directory_attendant_exit/run-test 1959 
>   asterisk/trunk/tests/apps/directory_context_operator_exit/run-test 1959 
>   asterisk/trunk/tests/apps/directory_operator_exit/run-test 1959 
>   asterisk/trunk/tests/apps/voicemail/leave_voicemail_nominal/run-test 1959 
>   asterisk/trunk/tests/blind-transfer-parkingtimeout/run-test 1959 
>   asterisk/trunk/tests/directed_pickup/run-test 1959 
>   asterisk/trunk/tests/dynamic-modules/run-test 1959 
>   asterisk/trunk/tests/fastagi/channel-status/run-test 1959 
>   asterisk/trunk/tests/fastagi/connect/run-test 1959 
>   asterisk/trunk/tests/fastagi/control-stream-file/run-test 1959 
>   asterisk/trunk/tests/fastagi/database/run-test 1959 
>   asterisk/trunk/tests/fastagi/execute/run-test 1959 
>   asterisk/trunk/tests/fastagi/get-data/run-test 1959 
>   asterisk/trunk/tests/fastagi/hangup/run-test 1959 
>   asterisk/trunk/tests/fastagi/record-file/run-test 1959 
>   asterisk/trunk/tests/fastagi/say-alpha/run-test 1959 
>   asterisk/trunk/tests/fastagi/say-date/run-test 1959 
>   asterisk/trunk/tests/fastagi/say-datetime/run-test 1959 
>   asterisk/trunk/tests/fastagi/say-digits/run-test 1959 
>   asterisk/trunk/tests/fastagi/say-number/run-test 1959 
>   asterisk/trunk/tests/fastagi/say-phonetic/run-test 1959 
>   asterisk/trunk/tests/fastagi/say-time/run-test 1959 
>   asterisk/trunk/tests/fastagi/stream-file/run-test 1959 
>   asterisk/trunk/tests/fastagi/wait-for-digit/run-test 1959 
>   asterisk/trunk/tests/fax/gateway_g711_t38/run-test 1959 
>   asterisk/trunk/tests/fax/gateway_mix1/run-test 1959 
>   asterisk/trunk/tests/fax/gateway_mix2/run-test 1959 
>   asterisk/trunk/tests/fax/gateway_mix3/run-test 1959 
>   asterisk/trunk/tests/fax/gateway_mix4/run-test 1959 
>   asterisk/trunk/tests/fax/gateway_native_t38/run-test 1959 
>   asterisk/trunk/tests/fax/gateway_native_t38_ced/run-test 1959 
>   asterisk/trunk/tests/fax/gateway_no_t38/run-test 1959 
>   asterisk/trunk/tests/fax/gateway_t38_g711/run-test 1959 
>   asterisk/trunk/tests/fax/gateway_timeout1/run-test 1959 
>   asterisk/trunk/tests/fax/gateway_timeout2/run-test 1959 
>   asterisk/trunk/tests/fax/gateway_timeout3/run-test 1959 
>   asterisk/trunk/tests/fax/gateway_timeout4/run-test 1959 
>   asterisk/trunk/tests/fax/gateway_timeout5/run-test 1959 
>   asterisk/trunk/tests/feature_attended_transfer/run-test 1959 
>   asterisk/trunk/tests/feature_blonde_transfer/run-test 1959 
>   asterisk/trunk/tests/func_srv/run-test 1959 
>   asterisk/trunk/tests/iax2/basic-call/run-test 1959 
>   asterisk/trunk/tests/manager/event-monitor/run-test 1959 
>   asterisk/trunk/tests/manager/login/run-test 1959 
>   asterisk/trunk/tests/mixmonitor/run-test 1959 
>   asterisk/trunk/tests/mixmonitor_audiohook_inherit/run-test 1959 
>   asterisk/trunk/tests/one-step-parking/run-test 1959 
>   asterisk/trunk/tests/pbx/call-files/run-test 1959 
>   asterisk/trunk/tests/pbx/merge_contexts/run-test 1959 
>   asterisk/trunk/tests/pbx/pbx_lua_background/run-test 1959 
>   asterisk/trunk/tests/pbx/pbx_lua_goto/run-test 1959 
>   asterisk/trunk/tests/regressions/M18882/run-test 1959 
>   asterisk/trunk/tests/udptl/run-test 1959 
>   asterisk/trunk/tests/udptl_v6/run-test 1959 
> 
> Diff: https://reviewboard.asterisk.org/r/1386/diff
> 
> 
> Testing
> -------
> 
> Local development box
> 
> 
> Thanks,
> 
> Paul
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20110826/c7d932ff/attachment.htm>


More information about the asterisk-dev mailing list