[asterisk-dev] [Code Review] 2618: testsuite - Add module for testing RESTful API

opticron reviewboard at asterisk.org
Thu Jun 20 14:35:28 CDT 2013


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

Ship it!



/asterisk/trunk/sample-yaml/ari-config.yaml.sample
<https://reviewboard.asterisk.org/r/2618/#comment17551>

    I would include an example of nesting an object inside of a list here or somewhere else in the documentation.


- opticron


On June 12, 2013, 3:32 p.m., David Lee wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2618/
> -----------------------------------------------------------
> 
> (Updated June 12, 2013, 3:32 p.m.)
> 
> 
> Review request for Asterisk Developers and Matt Jordan.
> 
> 
> Bugs: ASTERISK-21818
>     https://issues.asterisk.org/jira/browse/ASTERISK-21818
> 
> 
> Repository: testsuite
> 
> 
> Description
> -------
> 
> This patch adds a pluggable module to the Asterisk testing framework
> to aid in testing the new Asterisk 12 RESTful API's.
> 
> It is similar in scope to the AMI plugable module. In the test's
> test-config.yaml file, event specifications can be specified, along
> with requirements for passing the test. The only requirements
> implemented by this patch are count (which support >, < and exact
> count) and callback (which is also where custom logic may be kicked
> off on events).
> 
> The WebSocket client is implemented using autobahn's WebSocket
> support[1], since that plays very nicely with our Twisted infected
> framework. RESTful API invocations are made using Requests[2], since
> it's an extremely convenient abstraction for HTTP.
> 
> A test for the /channels/{channelId}/continue resource was added for
> the initial implementation.
> 
>  [1]: http://autobahn.ws/
>  [2]: http://docs.python-requests.org/en/latest/
> 
> 
> Diffs
> -----
> 
>   /asterisk/trunk/tests/tests.yaml 3846 
>   /asterisk/trunk/tests/rest_api/tests.yaml PRE-CREATION 
>   /asterisk/trunk/tests/rest_api/continue/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/rest_api/continue/rest_continue.py PRE-CREATION 
>   /asterisk/trunk/tests/rest_api/continue/configs/ast1/stasis_http.conf PRE-CREATION 
>   /asterisk/trunk/tests/rest_api/continue/configs/ast1/http.conf PRE-CREATION 
>   /asterisk/trunk/tests/rest_api/continue/configs/ast1/extensions.conf PRE-CREATION 
>   /asterisk/trunk/sample-yaml/ari-config.yaml.sample PRE-CREATION 
>   /asterisk/trunk/lib/python/asterisk/TestRunner.py 3846 
>   /asterisk/trunk/lib/python/asterisk/ari.py PRE-CREATION 
> 
> Diff: https://reviewboard.asterisk.org/r/2618/diff/
> 
> 
> Testing
> -------
> 
> Ran the unit test.
> 
> Also made minor changes to the test (changed config, URL's, etc.) to
> verify that it would fail as expected.
> 
> 
> Thanks,
> 
> David Lee
> 
>

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


More information about the asterisk-dev mailing list