[asterisk-dev] [Code Review] 4284: Testsuite: Update ARI test for continuation and add new ARI test for origination to dialplan location
Mark Michelson
reviewboard at asterisk.org
Fri Dec 19 12:18:16 CST 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4284/
-----------------------------------------------------------
(Updated Dec. 19, 2014, 6:18 p.m.)
Review request for Asterisk Developers.
Changes
-------
Fix formatting of lines in extensions.conf in the continuation tests. Some lines began with a tab and others began with four spaces. All indented lines now start with a tab.
Bugs: ASTERISK-24412
https://issues.asterisk.org/jira/browse/ASTERISK-24412
Repository: testsuite
Description
-------
Because of label support being added to ARI continuation/origination, I decided to make sure the new feature was well-tested in order to get the feature into Asterisk 13.
The continuation test as it exists only attempts to ensure that continuing to the next priority in the dialplan works correctly. The continuation test has been overhauled to instead test 24 combinations of specifying varying contexts, extensions, priorities, and labels to ensure that all combinations direct the channel to the expected location.
There were no existing tests for originating a channel to a dialplan location, so I have added one. This test performs 12 originations that test various combinations of context, extension, priority, and label. This has half as many test cases as continuation because origination mandates that an extension must be specified. So that eliminates the other 12 test cases that continuation has where we do not specify an extension.
There is one potentially controversial change made to lib/python/ari.py. I found it kind of annoying that I could not originate a channel and specify variables on it from my test-config.yaml. So I modified the post and put functions to be able to do this. If the 'json' key exists in the keyword parameters, it is popped out of the parameters and passed to the requests library function as its json parameter. This way, I could do the entire origination test in test-config.yaml.
The big thing I'm looking for on this test is to make sure that the assumptions about where to continue/originate when certain pieces of information are omitted makes sense.
Diffs (updated)
-----
/asterisk/trunk/tests/rest_api/continue/test-config.yaml 6075
/asterisk/trunk/tests/rest_api/continue/rest_continue.py 6075
/asterisk/trunk/tests/rest_api/continue/configs/ast1/extensions.conf 6075
/asterisk/trunk/tests/rest_api/channels/tests.yaml 6076
/asterisk/trunk/tests/rest_api/channels/originate_to_dialplan/test-config.yaml PRE-CREATION
/asterisk/trunk/tests/rest_api/channels/originate_to_dialplan/configs/ast1/extensions.conf PRE-CREATION
/asterisk/trunk/lib/python/asterisk/ari.py 6075
Diff: https://reviewboard.asterisk.org/r/4284/diff/
Testing
-------
The tests send channels to all the expected locations. If I modify locations in tests, I have verified that the channels go to the modified locations instead.
Thanks,
Mark Michelson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20141219/47a90248/attachment.html>
More information about the asterisk-dev
mailing list