Re: [asterisk-dev] [Code Review] 3660: testsuite: A rather comprehensive set of tests for DialplanAdd/RemoveExtension AMI commands

2014-07-16 Thread Jonathan Rose

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

(Updated July 16, 2014, 1:51 p.m.)


Status
--

This change has been marked as submitted.


Review request for Asterisk Developers, kmoore and Matt Jordan.


Changes
---

Committed in revision 5249


Repository: testsuite


Description
---

11 part test:
 1 - Remove an extension with a priority
 If the manager command fails, a failure token will be set
 If the original extension runs, a user event will be generated that makes 
the test fail

 2 - Remove an entire existing extension
 If the manager command fails, a failure token will be set
 If the original extension runs, a user event will be generated that makes 
the test fail

 3 - Add an extension
 If the manager command fails, a failure token will be set
 If the extension fails to run, an expected user event will not be 
generated and the test will fail

 4 - Add an extension with a CID match that doesn't match the originated channel
 If the manager command fails, a failure token will be set
 If the extension runs, a user event will be generated that makes the test 
fail

 5 - Add an extension with a CID match that should match the originated channel
 If the manager command fails, a failure token will be set
 If the extension fails to run, an expected user event will not be 
generated and the test will fail

 6 - Add an extension that replaces an existing priority
 If the manager command fails, a failure token will be set
 If the original extension runs, a user event will be generated that makes 
the test fail
 If the replacement extension doesn't run, an expected user event will not 
be generated and the test will fail

 7 - Attempt to add an extension that would replace an existing priority, but 
don't allow replacement
 If the manager command doesn't fail, a failure token will be set
 If the original extension doesn't run, an expected user event will not be 
generated and the test will fail
 If the replacement extension runs, a user event will be generated that 
makes the test fail

 8 - Remove an extension at a specific priority with caller ID matching
 If the manager command fails, a failure token will be set
 If the original extension runs, a user event will be generated that makes 
the test fail
 The originate is checked by means of a user event on a separate priority 
taht is not removed

 9 - Attempt DialplanAddExtension without priority set
 If the manager command doesn't fail, a failure token will be set

10 - Attempt DialplanAddExtension without application set
 If the manager command doesn't fail, a failure token will be set

11 - Attempt DialplanRemoveExtension on an extension that does not exist
 If the manager command doesn't fail, a failure token will be set


Diffs
-

  /asterisk/trunk/tests/pbx/tests.yaml 5204 
  /asterisk/trunk/tests/pbx/manager_extensions/test-config.yaml PRE-CREATION 
  /asterisk/trunk/tests/pbx/manager_extensions/configs/ast1/extensions.conf 
PRE-CREATION 
  /asterisk/trunk/tests/pbx/manager_extensions/ami_extension_control.py 
PRE-CREATION 

Diff: https://reviewboard.asterisk.org/r/3660/diff/


Testing
---

Removed execution of many of the test AMI commands to guarantee that if above 
failures occurred that the test would fail


Thanks,

Jonathan Rose

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Re: [asterisk-dev] [Code Review] 3660: testsuite: A rather comprehensive set of tests for DialplanAdd/RemoveExtension AMI commands

2014-07-09 Thread opticron

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

Ship it!


Ship It!

- opticron


On July 3, 2014, 3:40 p.m., Jonathan Rose wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3660/
> ---
> 
> (Updated July 3, 2014, 3:40 p.m.)
> 
> 
> Review request for Asterisk Developers, kmoore and Matt Jordan.
> 
> 
> Repository: testsuite
> 
> 
> Description
> ---
> 
> 11 part test:
>  1 - Remove an extension with a priority
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
> 
>  2 - Remove an entire existing extension
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
> 
>  3 - Add an extension
>  If the manager command fails, a failure token will be set
>  If the extension fails to run, an expected user event will not be 
> generated and the test will fail
> 
>  4 - Add an extension with a CID match that doesn't match the originated 
> channel
>  If the manager command fails, a failure token will be set
>  If the extension runs, a user event will be generated that makes the 
> test fail
> 
>  5 - Add an extension with a CID match that should match the originated 
> channel
>  If the manager command fails, a failure token will be set
>  If the extension fails to run, an expected user event will not be 
> generated and the test will fail
> 
>  6 - Add an extension that replaces an existing priority
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
>  If the replacement extension doesn't run, an expected user event will 
> not be generated and the test will fail
> 
>  7 - Attempt to add an extension that would replace an existing priority, but 
> don't allow replacement
>  If the manager command doesn't fail, a failure token will be set
>  If the original extension doesn't run, an expected user event will not 
> be generated and the test will fail
>  If the replacement extension runs, a user event will be generated that 
> makes the test fail
> 
>  8 - Remove an extension at a specific priority with caller ID matching
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
>  The originate is checked by means of a user event on a separate priority 
> taht is not removed
> 
>  9 - Attempt DialplanAddExtension without priority set
>  If the manager command doesn't fail, a failure token will be set
> 
> 10 - Attempt DialplanAddExtension without application set
>  If the manager command doesn't fail, a failure token will be set
> 
> 11 - Attempt DialplanRemoveExtension on an extension that does not exist
>  If the manager command doesn't fail, a failure token will be set
> 
> 
> Diffs
> -
> 
>   /asterisk/trunk/tests/pbx/tests.yaml 5204 
>   /asterisk/trunk/tests/pbx/manager_extensions/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/pbx/manager_extensions/configs/ast1/extensions.conf 
> PRE-CREATION 
>   /asterisk/trunk/tests/pbx/manager_extensions/ami_extension_control.py 
> PRE-CREATION 
> 
> Diff: https://reviewboard.asterisk.org/r/3660/diff/
> 
> 
> Testing
> ---
> 
> Removed execution of many of the test AMI commands to guarantee that if above 
> failures occurred that the test would fail
> 
> 
> Thanks,
> 
> Jonathan Rose
> 
>

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Re: [asterisk-dev] [Code Review] 3660: testsuite: A rather comprehensive set of tests for DialplanAdd/RemoveExtension AMI commands

2014-07-03 Thread Jonathan Rose

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

(Updated July 3, 2014, 3:40 p.m.)


Review request for Asterisk Developers, kmoore and Matt Jordan.


Changes
---

Hit kmoore's findings


Repository: testsuite


Description
---

11 part test:
 1 - Remove an extension with a priority
 If the manager command fails, a failure token will be set
 If the original extension runs, a user event will be generated that makes 
the test fail

 2 - Remove an entire existing extension
 If the manager command fails, a failure token will be set
 If the original extension runs, a user event will be generated that makes 
the test fail

 3 - Add an extension
 If the manager command fails, a failure token will be set
 If the extension fails to run, an expected user event will not be 
generated and the test will fail

 4 - Add an extension with a CID match that doesn't match the originated channel
 If the manager command fails, a failure token will be set
 If the extension runs, a user event will be generated that makes the test 
fail

 5 - Add an extension with a CID match that should match the originated channel
 If the manager command fails, a failure token will be set
 If the extension fails to run, an expected user event will not be 
generated and the test will fail

 6 - Add an extension that replaces an existing priority
 If the manager command fails, a failure token will be set
 If the original extension runs, a user event will be generated that makes 
the test fail
 If the replacement extension doesn't run, an expected user event will not 
be generated and the test will fail

 7 - Attempt to add an extension that would replace an existing priority, but 
don't allow replacement
 If the manager command doesn't fail, a failure token will be set
 If the original extension doesn't run, an expected user event will not be 
generated and the test will fail
 If the replacement extension runs, a user event will be generated that 
makes the test fail

 8 - Remove an extension at a specific priority with caller ID matching
 If the manager command fails, a failure token will be set
 If the original extension runs, a user event will be generated that makes 
the test fail
 The originate is checked by means of a user event on a separate priority 
taht is not removed

 9 - Attempt DialplanAddExtension without priority set
 If the manager command doesn't fail, a failure token will be set

10 - Attempt DialplanAddExtension without application set
 If the manager command doesn't fail, a failure token will be set

11 - Attempt DialplanRemoveExtension on an extension that does not exist
 If the manager command doesn't fail, a failure token will be set


Diffs (updated)
-

  /asterisk/trunk/tests/pbx/tests.yaml 5204 
  /asterisk/trunk/tests/pbx/manager_extensions/test-config.yaml PRE-CREATION 
  /asterisk/trunk/tests/pbx/manager_extensions/configs/ast1/extensions.conf 
PRE-CREATION 
  /asterisk/trunk/tests/pbx/manager_extensions/ami_extension_control.py 
PRE-CREATION 

Diff: https://reviewboard.asterisk.org/r/3660/diff/


Testing
---

Removed execution of many of the test AMI commands to guarantee that if above 
failures occurred that the test would fail


Thanks,

Jonathan Rose

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Re: [asterisk-dev] [Code Review] 3660: testsuite: A rather comprehensive set of tests for DialplanAdd/RemoveExtension AMI commands

2014-07-02 Thread Jonathan Rose


> On July 1, 2014, 1:40 p.m., opticron wrote:
> > /asterisk/trunk/tests/pbx/manager_extensions/ami_extension_control.py, line 
> > 40
> > 
> >
> > There is no need for a deep copy here since you don't touch the 
> > original after originating the calls.

This is probably a bit of paranoia on my part, but I don't want to mess with 
the originate list before originating all the calls and I have no guarantee 
that any given originate will begin before a previous originate's hangup 
response arrives. I figured the peace of mind was worthwhile since the deep 
copy doesn't really add any appreciable amount of time to the test.

If not though, sure, I can get rid of it and just cull from the original list.


- Jonathan


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


On June 26, 2014, 5:30 p.m., Jonathan Rose wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3660/
> ---
> 
> (Updated June 26, 2014, 5:30 p.m.)
> 
> 
> Review request for Asterisk Developers, kmoore and Matt Jordan.
> 
> 
> Repository: testsuite
> 
> 
> Description
> ---
> 
> 11 part test:
>  1 - Remove an extension with a priority
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
> 
>  2 - Remove an entire existing extension
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
> 
>  3 - Add an extension
>  If the manager command fails, a failure token will be set
>  If the extension fails to run, an expected user event will not be 
> generated and the test will fail
> 
>  4 - Add an extension with a CID match that doesn't match the originated 
> channel
>  If the manager command fails, a failure token will be set
>  If the extension runs, a user event will be generated that makes the 
> test fail
> 
>  5 - Add an extension with a CID match that should match the originated 
> channel
>  If the manager command fails, a failure token will be set
>  If the extension fails to run, an expected user event will not be 
> generated and the test will fail
> 
>  6 - Add an extension that replaces an existing priority
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
>  If the replacement extension doesn't run, an expected user event will 
> not be generated and the test will fail
> 
>  7 - Attempt to add an extension that would replace an existing priority, but 
> don't allow replacement
>  If the manager command doesn't fail, a failure token will be set
>  If the original extension doesn't run, an expected user event will not 
> be generated and the test will fail
>  If the replacement extension runs, a user event will be generated that 
> makes the test fail
> 
>  8 - Remove an extension at a specific priority with caller ID matching
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
>  The originate is checked by means of a user event on a separate priority 
> taht is not removed
> 
>  9 - Attempt DialplanAddExtension without priority set
>  If the manager command doesn't fail, a failure token will be set
> 
> 10 - Attempt DialplanAddExtension without application set
>  If the manager command doesn't fail, a failure token will be set
> 
> 11 - Attempt DialplanRemoveExtension on an extension that does not exist
>  If the manager command doesn't fail, a failure token will be set
> 
> 
> Diffs
> -
> 
>   /asterisk/trunk/tests/pbx/tests.yaml 5144 
>   /asterisk/trunk/tests/pbx/manager_extensions/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/pbx/manager_extensions/configs/ast1/extensions.conf 
> PRE-CREATION 
>   /asterisk/trunk/tests/pbx/manager_extensions/ami_extension_control.py 
> PRE-CREATION 
> 
> Diff: https://reviewboard.asterisk.org/r/3660/diff/
> 
> 
> Testing
> ---
> 
> Removed execution of many of the test AMI commands to guarantee that if above 
> failures occurred that the test would fail
> 
> 
> Thanks,
> 
> Jonathan Rose
> 
>

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Re: [asterisk-dev] [Code Review] 3660: testsuite: A rather comprehensive set of tests for DialplanAdd/RemoveExtension AMI commands

2014-07-02 Thread Jonathan Rose


> On July 1, 2014, 1:40 p.m., opticron wrote:
> > /asterisk/trunk/tests/pbx/manager_extensions/test-config.yaml, line 34
> > 
> >
> > This test doesn't seem to actually use the ActionIDs provided for the 
> > defined commands.

It's for diagnostic purposes in case one or more of the action responses 
doesn't match with the expectations. The full response will show up in the 
failure token error message and the ActionID will be with it.


- Jonathan


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


On June 26, 2014, 5:30 p.m., Jonathan Rose wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3660/
> ---
> 
> (Updated June 26, 2014, 5:30 p.m.)
> 
> 
> Review request for Asterisk Developers, kmoore and Matt Jordan.
> 
> 
> Repository: testsuite
> 
> 
> Description
> ---
> 
> 11 part test:
>  1 - Remove an extension with a priority
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
> 
>  2 - Remove an entire existing extension
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
> 
>  3 - Add an extension
>  If the manager command fails, a failure token will be set
>  If the extension fails to run, an expected user event will not be 
> generated and the test will fail
> 
>  4 - Add an extension with a CID match that doesn't match the originated 
> channel
>  If the manager command fails, a failure token will be set
>  If the extension runs, a user event will be generated that makes the 
> test fail
> 
>  5 - Add an extension with a CID match that should match the originated 
> channel
>  If the manager command fails, a failure token will be set
>  If the extension fails to run, an expected user event will not be 
> generated and the test will fail
> 
>  6 - Add an extension that replaces an existing priority
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
>  If the replacement extension doesn't run, an expected user event will 
> not be generated and the test will fail
> 
>  7 - Attempt to add an extension that would replace an existing priority, but 
> don't allow replacement
>  If the manager command doesn't fail, a failure token will be set
>  If the original extension doesn't run, an expected user event will not 
> be generated and the test will fail
>  If the replacement extension runs, a user event will be generated that 
> makes the test fail
> 
>  8 - Remove an extension at a specific priority with caller ID matching
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
>  The originate is checked by means of a user event on a separate priority 
> taht is not removed
> 
>  9 - Attempt DialplanAddExtension without priority set
>  If the manager command doesn't fail, a failure token will be set
> 
> 10 - Attempt DialplanAddExtension without application set
>  If the manager command doesn't fail, a failure token will be set
> 
> 11 - Attempt DialplanRemoveExtension on an extension that does not exist
>  If the manager command doesn't fail, a failure token will be set
> 
> 
> Diffs
> -
> 
>   /asterisk/trunk/tests/pbx/tests.yaml 5144 
>   /asterisk/trunk/tests/pbx/manager_extensions/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/pbx/manager_extensions/configs/ast1/extensions.conf 
> PRE-CREATION 
>   /asterisk/trunk/tests/pbx/manager_extensions/ami_extension_control.py 
> PRE-CREATION 
> 
> Diff: https://reviewboard.asterisk.org/r/3660/diff/
> 
> 
> Testing
> ---
> 
> Removed execution of many of the test AMI commands to guarantee that if above 
> failures occurred that the test would fail
> 
> 
> Thanks,
> 
> Jonathan Rose
> 
>

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Re: [asterisk-dev] [Code Review] 3660: testsuite: A rather comprehensive set of tests for DialplanAdd/RemoveExtension AMI commands

2014-07-01 Thread opticron

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



/asterisk/trunk/tests/pbx/manager_extensions/ami_extension_control.py


s/COntrol/Control



/asterisk/trunk/tests/pbx/manager_extensions/ami_extension_control.py


There is no need for a deep copy here since you don't touch the original 
after originating the calls.



/asterisk/trunk/tests/pbx/manager_extensions/test-config.yaml


This test doesn't seem to actually use the ActionIDs provided for the 
defined commands.


- opticron


On June 26, 2014, 5:30 p.m., Jonathan Rose wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3660/
> ---
> 
> (Updated June 26, 2014, 5:30 p.m.)
> 
> 
> Review request for Asterisk Developers, kmoore and Matt Jordan.
> 
> 
> Repository: testsuite
> 
> 
> Description
> ---
> 
> 11 part test:
>  1 - Remove an extension with a priority
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
> 
>  2 - Remove an entire existing extension
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
> 
>  3 - Add an extension
>  If the manager command fails, a failure token will be set
>  If the extension fails to run, an expected user event will not be 
> generated and the test will fail
> 
>  4 - Add an extension with a CID match that doesn't match the originated 
> channel
>  If the manager command fails, a failure token will be set
>  If the extension runs, a user event will be generated that makes the 
> test fail
> 
>  5 - Add an extension with a CID match that should match the originated 
> channel
>  If the manager command fails, a failure token will be set
>  If the extension fails to run, an expected user event will not be 
> generated and the test will fail
> 
>  6 - Add an extension that replaces an existing priority
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
>  If the replacement extension doesn't run, an expected user event will 
> not be generated and the test will fail
> 
>  7 - Attempt to add an extension that would replace an existing priority, but 
> don't allow replacement
>  If the manager command doesn't fail, a failure token will be set
>  If the original extension doesn't run, an expected user event will not 
> be generated and the test will fail
>  If the replacement extension runs, a user event will be generated that 
> makes the test fail
> 
>  8 - Remove an extension at a specific priority with caller ID matching
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
>  The originate is checked by means of a user event on a separate priority 
> taht is not removed
> 
>  9 - Attempt DialplanAddExtension without priority set
>  If the manager command doesn't fail, a failure token will be set
> 
> 10 - Attempt DialplanAddExtension without application set
>  If the manager command doesn't fail, a failure token will be set
> 
> 11 - Attempt DialplanRemoveExtension on an extension that does not exist
>  If the manager command doesn't fail, a failure token will be set
> 
> 
> Diffs
> -
> 
>   /asterisk/trunk/tests/pbx/tests.yaml 5144 
>   /asterisk/trunk/tests/pbx/manager_extensions/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/pbx/manager_extensions/configs/ast1/extensions.conf 
> PRE-CREATION 
>   /asterisk/trunk/tests/pbx/manager_extensions/ami_extension_control.py 
> PRE-CREATION 
> 
> Diff: https://reviewboard.asterisk.org/r/3660/diff/
> 
> 
> Testing
> ---
> 
> Removed execution of many of the test AMI commands to guarantee that if above 
> failures occurred that the test would fail
> 
> 
> Thanks,
> 
> Jonathan Rose
> 
>

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Re: [asterisk-dev] [Code Review] 3660: testsuite: A rather comprehensive set of tests for DialplanAdd/RemoveExtension AMI commands

2014-06-26 Thread Jonathan Rose


> On June 26, 2014, 5:33 p.m., Jonathan Rose wrote:
> > /asterisk/trunk/tests/pbx/manager_extensions/ami_extension_control.py, line 
> > 129
> > 
> >
> > Bleh, this is inaccurate. It actually stops the test once a hangup 
> > occurs for every originate. Technically there are two originated channels 
> > per one of these, we just don't care because if one hangs up they are both 
> > hanging up as a general rule and its role in the test is over.
> > 
> > Changed to:
> > 
> > """Responds to Hangup manager events and stops the test once each 
> > originate action receives a corresponding hangup."""

Well, the action doesn't 'receive' anything... my descriptive abilities fail me.

"""Responds to Hangup manager events and stops the test once a hangup has 
occurred for each originate action"""


- Jonathan


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


On June 26, 2014, 5:30 p.m., Jonathan Rose wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3660/
> ---
> 
> (Updated June 26, 2014, 5:30 p.m.)
> 
> 
> Review request for Asterisk Developers, kmoore and Matt Jordan.
> 
> 
> Repository: testsuite
> 
> 
> Description
> ---
> 
> 11 part test:
>  1 - Remove an extension with a priority
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
> 
>  2 - Remove an entire existing extension
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
> 
>  3 - Add an extension
>  If the manager command fails, a failure token will be set
>  If the extension fails to run, an expected user event will not be 
> generated and the test will fail
> 
>  4 - Add an extension with a CID match that doesn't match the originated 
> channel
>  If the manager command fails, a failure token will be set
>  If the extension runs, a user event will be generated that makes the 
> test fail
> 
>  5 - Add an extension with a CID match that should match the originated 
> channel
>  If the manager command fails, a failure token will be set
>  If the extension fails to run, an expected user event will not be 
> generated and the test will fail
> 
>  6 - Add an extension that replaces an existing priority
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
>  If the replacement extension doesn't run, an expected user event will 
> not be generated and the test will fail
> 
>  7 - Attempt to add an extension that would replace an existing priority, but 
> don't allow replacement
>  If the manager command doesn't fail, a failure token will be set
>  If the original extension doesn't run, an expected user event will not 
> be generated and the test will fail
>  If the replacement extension runs, a user event will be generated that 
> makes the test fail
> 
>  8 - Remove an extension at a specific priority with caller ID matching
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
>  The originate is checked by means of a user event on a separate priority 
> taht is not removed
> 
>  9 - Attempt DialplanAddExtension without priority set
>  If the manager command doesn't fail, a failure token will be set
> 
> 10 - Attempt DialplanAddExtension without application set
>  If the manager command doesn't fail, a failure token will be set
> 
> 11 - Attempt DialplanRemoveExtension on an extension that does not exist
>  If the manager command doesn't fail, a failure token will be set
> 
> 
> Diffs
> -
> 
>   /asterisk/trunk/tests/pbx/tests.yaml 5144 
>   /asterisk/trunk/tests/pbx/manager_extensions/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/pbx/manager_extensions/configs/ast1/extensions.conf 
> PRE-CREATION 
>   /asterisk/trunk/tests/pbx/manager_extensions/ami_extension_control.py 
> PRE-CREATION 
> 
> Diff: https://reviewboard.asterisk.org/r/3660/diff/
> 
> 
> Testing
> ---
> 
> Removed execution of many of the test AMI commands to guarantee that if above 
> failures occurred that the test would fail
> 
> 
> Thanks,
> 
> Jonathan Rose
> 
>

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mail

Re: [asterisk-dev] [Code Review] 3660: testsuite: A rather comprehensive set of tests for DialplanAdd/RemoveExtension AMI commands

2014-06-26 Thread Jonathan Rose

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



/asterisk/trunk/tests/pbx/manager_extensions/ami_extension_control.py


Bleh, this is inaccurate. It actually stops the test once a hangup occurs 
for every originate. Technically there are two originated channels per one of 
these, we just don't care because if one hangs up they are both hanging up as a 
general rule and its role in the test is over.

Changed to:

"""Responds to Hangup manager events and stops the test once each originate 
action receives a corresponding hangup."""


- Jonathan Rose


On June 26, 2014, 5:30 p.m., Jonathan Rose wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3660/
> ---
> 
> (Updated June 26, 2014, 5:30 p.m.)
> 
> 
> Review request for Asterisk Developers, kmoore and Matt Jordan.
> 
> 
> Repository: testsuite
> 
> 
> Description
> ---
> 
> 11 part test:
>  1 - Remove an extension with a priority
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
> 
>  2 - Remove an entire existing extension
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
> 
>  3 - Add an extension
>  If the manager command fails, a failure token will be set
>  If the extension fails to run, an expected user event will not be 
> generated and the test will fail
> 
>  4 - Add an extension with a CID match that doesn't match the originated 
> channel
>  If the manager command fails, a failure token will be set
>  If the extension runs, a user event will be generated that makes the 
> test fail
> 
>  5 - Add an extension with a CID match that should match the originated 
> channel
>  If the manager command fails, a failure token will be set
>  If the extension fails to run, an expected user event will not be 
> generated and the test will fail
> 
>  6 - Add an extension that replaces an existing priority
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
>  If the replacement extension doesn't run, an expected user event will 
> not be generated and the test will fail
> 
>  7 - Attempt to add an extension that would replace an existing priority, but 
> don't allow replacement
>  If the manager command doesn't fail, a failure token will be set
>  If the original extension doesn't run, an expected user event will not 
> be generated and the test will fail
>  If the replacement extension runs, a user event will be generated that 
> makes the test fail
> 
>  8 - Remove an extension at a specific priority with caller ID matching
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
>  The originate is checked by means of a user event on a separate priority 
> taht is not removed
> 
>  9 - Attempt DialplanAddExtension without priority set
>  If the manager command doesn't fail, a failure token will be set
> 
> 10 - Attempt DialplanAddExtension without application set
>  If the manager command doesn't fail, a failure token will be set
> 
> 11 - Attempt DialplanRemoveExtension on an extension that does not exist
>  If the manager command doesn't fail, a failure token will be set
> 
> 
> Diffs
> -
> 
>   /asterisk/trunk/tests/pbx/tests.yaml 5144 
>   /asterisk/trunk/tests/pbx/manager_extensions/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/pbx/manager_extensions/configs/ast1/extensions.conf 
> PRE-CREATION 
>   /asterisk/trunk/tests/pbx/manager_extensions/ami_extension_control.py 
> PRE-CREATION 
> 
> Diff: https://reviewboard.asterisk.org/r/3660/diff/
> 
> 
> Testing
> ---
> 
> Removed execution of many of the test AMI commands to guarantee that if above 
> failures occurred that the test would fail
> 
> 
> Thanks,
> 
> Jonathan Rose
> 
>

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Re: [asterisk-dev] [Code Review] 3660: testsuite: A rather comprehensive set of tests for DialplanAdd/RemoveExtension AMI commands

2014-06-26 Thread Jonathan Rose

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


s/ends Asterisk/ends the test/

- Jonathan Rose


On June 26, 2014, 5:30 p.m., Jonathan Rose wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3660/
> ---
> 
> (Updated June 26, 2014, 5:30 p.m.)
> 
> 
> Review request for Asterisk Developers, kmoore and Matt Jordan.
> 
> 
> Repository: testsuite
> 
> 
> Description
> ---
> 
> 11 part test:
>  1 - Remove an extension with a priority
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
> 
>  2 - Remove an entire existing extension
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
> 
>  3 - Add an extension
>  If the manager command fails, a failure token will be set
>  If the extension fails to run, an expected user event will not be 
> generated and the test will fail
> 
>  4 - Add an extension with a CID match that doesn't match the originated 
> channel
>  If the manager command fails, a failure token will be set
>  If the extension runs, a user event will be generated that makes the 
> test fail
> 
>  5 - Add an extension with a CID match that should match the originated 
> channel
>  If the manager command fails, a failure token will be set
>  If the extension fails to run, an expected user event will not be 
> generated and the test will fail
> 
>  6 - Add an extension that replaces an existing priority
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
>  If the replacement extension doesn't run, an expected user event will 
> not be generated and the test will fail
> 
>  7 - Attempt to add an extension that would replace an existing priority, but 
> don't allow replacement
>  If the manager command doesn't fail, a failure token will be set
>  If the original extension doesn't run, an expected user event will not 
> be generated and the test will fail
>  If the replacement extension runs, a user event will be generated that 
> makes the test fail
> 
>  8 - Remove an extension at a specific priority with caller ID matching
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
>  The originate is checked by means of a user event on a separate priority 
> taht is not removed
> 
>  9 - Attempt DialplanAddExtension without priority set
>  If the manager command doesn't fail, a failure token will be set
> 
> 10 - Attempt DialplanAddExtension without application set
>  If the manager command doesn't fail, a failure token will be set
> 
> 11 - Attempt DialplanRemoveExtension on an extension that does not exist
>  If the manager command doesn't fail, a failure token will be set
> 
> 
> Diffs
> -
> 
>   /asterisk/trunk/tests/pbx/tests.yaml 5144 
>   /asterisk/trunk/tests/pbx/manager_extensions/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/pbx/manager_extensions/configs/ast1/extensions.conf 
> PRE-CREATION 
>   /asterisk/trunk/tests/pbx/manager_extensions/ami_extension_control.py 
> PRE-CREATION 
> 
> Diff: https://reviewboard.asterisk.org/r/3660/diff/
> 
> 
> Testing
> ---
> 
> Removed execution of many of the test AMI commands to guarantee that if above 
> failures occurred that the test would fail
> 
> 
> Thanks,
> 
> Jonathan Rose
> 
>

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Re: [asterisk-dev] [Code Review] 3660: testsuite: A rather comprehensive set of tests for DialplanAdd/RemoveExtension AMI commands

2014-06-26 Thread Jonathan Rose

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

(Updated June 26, 2014, 5:30 p.m.)


Review request for Asterisk Developers, kmoore and Matt Jordan.


Changes
---

Add an event listener that checks hangup events and ends Asterisk once a hangup 
for every originate has occurred.


Repository: testsuite


Description
---

11 part test:
 1 - Remove an extension with a priority
 If the manager command fails, a failure token will be set
 If the original extension runs, a user event will be generated that makes 
the test fail

 2 - Remove an entire existing extension
 If the manager command fails, a failure token will be set
 If the original extension runs, a user event will be generated that makes 
the test fail

 3 - Add an extension
 If the manager command fails, a failure token will be set
 If the extension fails to run, an expected user event will not be 
generated and the test will fail

 4 - Add an extension with a CID match that doesn't match the originated channel
 If the manager command fails, a failure token will be set
 If the extension runs, a user event will be generated that makes the test 
fail

 5 - Add an extension with a CID match that should match the originated channel
 If the manager command fails, a failure token will be set
 If the extension fails to run, an expected user event will not be 
generated and the test will fail

 6 - Add an extension that replaces an existing priority
 If the manager command fails, a failure token will be set
 If the original extension runs, a user event will be generated that makes 
the test fail
 If the replacement extension doesn't run, an expected user event will not 
be generated and the test will fail

 7 - Attempt to add an extension that would replace an existing priority, but 
don't allow replacement
 If the manager command doesn't fail, a failure token will be set
 If the original extension doesn't run, an expected user event will not be 
generated and the test will fail
 If the replacement extension runs, a user event will be generated that 
makes the test fail

 8 - Remove an extension at a specific priority with caller ID matching
 If the manager command fails, a failure token will be set
 If the original extension runs, a user event will be generated that makes 
the test fail
 The originate is checked by means of a user event on a separate priority 
taht is not removed

 9 - Attempt DialplanAddExtension without priority set
 If the manager command doesn't fail, a failure token will be set

10 - Attempt DialplanAddExtension without application set
 If the manager command doesn't fail, a failure token will be set

11 - Attempt DialplanRemoveExtension on an extension that does not exist
 If the manager command doesn't fail, a failure token will be set


Diffs (updated)
-

  /asterisk/trunk/tests/pbx/tests.yaml 5144 
  /asterisk/trunk/tests/pbx/manager_extensions/test-config.yaml PRE-CREATION 
  /asterisk/trunk/tests/pbx/manager_extensions/configs/ast1/extensions.conf 
PRE-CREATION 
  /asterisk/trunk/tests/pbx/manager_extensions/ami_extension_control.py 
PRE-CREATION 

Diff: https://reviewboard.asterisk.org/r/3660/diff/


Testing
---

Removed execution of many of the test AMI commands to guarantee that if above 
failures occurred that the test would fail


Thanks,

Jonathan Rose

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Re: [asterisk-dev] [Code Review] 3660: testsuite: A rather comprehensive set of tests for DialplanAdd/RemoveExtension AMI commands

2014-06-26 Thread Jonathan Rose


> On June 26, 2014, 4:27 p.m., Scott Griepentrog wrote:
> > Is it worth it to detect when all the originated channels have hung up and 
> > shut the test down early, rather than waiting 30 seconds for reactor 
> > timeout?
> >

Well, worth it or not I just did it.


- Jonathan


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


On June 26, 2014, 4:12 p.m., Jonathan Rose wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3660/
> ---
> 
> (Updated June 26, 2014, 4:12 p.m.)
> 
> 
> Review request for Asterisk Developers, kmoore and Matt Jordan.
> 
> 
> Repository: testsuite
> 
> 
> Description
> ---
> 
> 11 part test:
>  1 - Remove an extension with a priority
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
> 
>  2 - Remove an entire existing extension
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
> 
>  3 - Add an extension
>  If the manager command fails, a failure token will be set
>  If the extension fails to run, an expected user event will not be 
> generated and the test will fail
> 
>  4 - Add an extension with a CID match that doesn't match the originated 
> channel
>  If the manager command fails, a failure token will be set
>  If the extension runs, a user event will be generated that makes the 
> test fail
> 
>  5 - Add an extension with a CID match that should match the originated 
> channel
>  If the manager command fails, a failure token will be set
>  If the extension fails to run, an expected user event will not be 
> generated and the test will fail
> 
>  6 - Add an extension that replaces an existing priority
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
>  If the replacement extension doesn't run, an expected user event will 
> not be generated and the test will fail
> 
>  7 - Attempt to add an extension that would replace an existing priority, but 
> don't allow replacement
>  If the manager command doesn't fail, a failure token will be set
>  If the original extension doesn't run, an expected user event will not 
> be generated and the test will fail
>  If the replacement extension runs, a user event will be generated that 
> makes the test fail
> 
>  8 - Remove an extension at a specific priority with caller ID matching
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
>  The originate is checked by means of a user event on a separate priority 
> taht is not removed
> 
>  9 - Attempt DialplanAddExtension without priority set
>  If the manager command doesn't fail, a failure token will be set
> 
> 10 - Attempt DialplanAddExtension without application set
>  If the manager command doesn't fail, a failure token will be set
> 
> 11 - Attempt DialplanRemoveExtension on an extension that does not exist
>  If the manager command doesn't fail, a failure token will be set
> 
> 
> Diffs
> -
> 
>   /asterisk/trunk/tests/pbx/tests.yaml 5144 
>   /asterisk/trunk/tests/pbx/manager_extensions/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/pbx/manager_extensions/configs/ast1/extensions.conf 
> PRE-CREATION 
>   /asterisk/trunk/tests/pbx/manager_extensions/ami_extension_control.py 
> PRE-CREATION 
> 
> Diff: https://reviewboard.asterisk.org/r/3660/diff/
> 
> 
> Testing
> ---
> 
> Removed execution of many of the test AMI commands to guarantee that if above 
> failures occurred that the test would fail
> 
> 
> Thanks,
> 
> Jonathan Rose
> 
>

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Re: [asterisk-dev] [Code Review] 3660: testsuite: A rather comprehensive set of tests for DialplanAdd/RemoveExtension AMI commands

2014-06-26 Thread Scott Griepentrog

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


Is it worth it to detect when all the originated channels have hung up and shut 
the test down early, rather than waiting 30 seconds for reactor timeout?


- Scott Griepentrog


On June 26, 2014, 4:12 p.m., Jonathan Rose wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3660/
> ---
> 
> (Updated June 26, 2014, 4:12 p.m.)
> 
> 
> Review request for Asterisk Developers, kmoore and Matt Jordan.
> 
> 
> Repository: testsuite
> 
> 
> Description
> ---
> 
> 11 part test:
>  1 - Remove an extension with a priority
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
> 
>  2 - Remove an entire existing extension
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
> 
>  3 - Add an extension
>  If the manager command fails, a failure token will be set
>  If the extension fails to run, an expected user event will not be 
> generated and the test will fail
> 
>  4 - Add an extension with a CID match that doesn't match the originated 
> channel
>  If the manager command fails, a failure token will be set
>  If the extension runs, a user event will be generated that makes the 
> test fail
> 
>  5 - Add an extension with a CID match that should match the originated 
> channel
>  If the manager command fails, a failure token will be set
>  If the extension fails to run, an expected user event will not be 
> generated and the test will fail
> 
>  6 - Add an extension that replaces an existing priority
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
>  If the replacement extension doesn't run, an expected user event will 
> not be generated and the test will fail
> 
>  7 - Attempt to add an extension that would replace an existing priority, but 
> don't allow replacement
>  If the manager command doesn't fail, a failure token will be set
>  If the original extension doesn't run, an expected user event will not 
> be generated and the test will fail
>  If the replacement extension runs, a user event will be generated that 
> makes the test fail
> 
>  8 - Remove an extension at a specific priority with caller ID matching
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
>  The originate is checked by means of a user event on a separate priority 
> taht is not removed
> 
>  9 - Attempt DialplanAddExtension without priority set
>  If the manager command doesn't fail, a failure token will be set
> 
> 10 - Attempt DialplanAddExtension without application set
>  If the manager command doesn't fail, a failure token will be set
> 
> 11 - Attempt DialplanRemoveExtension on an extension that does not exist
>  If the manager command doesn't fail, a failure token will be set
> 
> 
> Diffs
> -
> 
>   /asterisk/trunk/tests/pbx/tests.yaml 5144 
>   /asterisk/trunk/tests/pbx/manager_extensions/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/pbx/manager_extensions/configs/ast1/extensions.conf 
> PRE-CREATION 
>   /asterisk/trunk/tests/pbx/manager_extensions/ami_extension_control.py 
> PRE-CREATION 
> 
> Diff: https://reviewboard.asterisk.org/r/3660/diff/
> 
> 
> Testing
> ---
> 
> Removed execution of many of the test AMI commands to guarantee that if above 
> failures occurred that the test would fail
> 
> 
> Thanks,
> 
> Jonathan Rose
> 
>

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Re: [asterisk-dev] [Code Review] 3660: testsuite: A rather comprehensive set of tests for DialplanAdd/RemoveExtension AMI commands

2014-06-26 Thread Jonathan Rose

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

(Updated June 26, 2014, 4:12 p.m.)


Review request for Asterisk Developers, kmoore and Matt Jordan.


Changes
---

Changes DialplanAdd/RemoveExtension to DialplanExtensionAdd/Remove per the most 
recent change to r3650


Repository: testsuite


Description
---

11 part test:
 1 - Remove an extension with a priority
 If the manager command fails, a failure token will be set
 If the original extension runs, a user event will be generated that makes 
the test fail

 2 - Remove an entire existing extension
 If the manager command fails, a failure token will be set
 If the original extension runs, a user event will be generated that makes 
the test fail

 3 - Add an extension
 If the manager command fails, a failure token will be set
 If the extension fails to run, an expected user event will not be 
generated and the test will fail

 4 - Add an extension with a CID match that doesn't match the originated channel
 If the manager command fails, a failure token will be set
 If the extension runs, a user event will be generated that makes the test 
fail

 5 - Add an extension with a CID match that should match the originated channel
 If the manager command fails, a failure token will be set
 If the extension fails to run, an expected user event will not be 
generated and the test will fail

 6 - Add an extension that replaces an existing priority
 If the manager command fails, a failure token will be set
 If the original extension runs, a user event will be generated that makes 
the test fail
 If the replacement extension doesn't run, an expected user event will not 
be generated and the test will fail

 7 - Attempt to add an extension that would replace an existing priority, but 
don't allow replacement
 If the manager command doesn't fail, a failure token will be set
 If the original extension doesn't run, an expected user event will not be 
generated and the test will fail
 If the replacement extension runs, a user event will be generated that 
makes the test fail

 8 - Remove an extension at a specific priority with caller ID matching
 If the manager command fails, a failure token will be set
 If the original extension runs, a user event will be generated that makes 
the test fail
 The originate is checked by means of a user event on a separate priority 
taht is not removed

 9 - Attempt DialplanAddExtension without priority set
 If the manager command doesn't fail, a failure token will be set

10 - Attempt DialplanAddExtension without application set
 If the manager command doesn't fail, a failure token will be set

11 - Attempt DialplanRemoveExtension on an extension that does not exist
 If the manager command doesn't fail, a failure token will be set


Diffs (updated)
-

  /asterisk/trunk/tests/pbx/tests.yaml 5144 
  /asterisk/trunk/tests/pbx/manager_extensions/test-config.yaml PRE-CREATION 
  /asterisk/trunk/tests/pbx/manager_extensions/configs/ast1/extensions.conf 
PRE-CREATION 
  /asterisk/trunk/tests/pbx/manager_extensions/ami_extension_control.py 
PRE-CREATION 

Diff: https://reviewboard.asterisk.org/r/3660/diff/


Testing
---

Removed execution of many of the test AMI commands to guarantee that if above 
failures occurred that the test would fail


Thanks,

Jonathan Rose

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Re: [asterisk-dev] [Code Review] 3660: testsuite: A rather comprehensive set of tests for DialplanAdd/RemoveExtension AMI commands

2014-06-26 Thread Jonathan Rose

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

(Updated June 26, 2014, 3:54 p.m.)


Review request for Asterisk Developers, kmoore and Matt Jordan.


Changes
---

Adding depends on field


Repository: testsuite


Description
---

11 part test:
 1 - Remove an extension with a priority
 If the manager command fails, a failure token will be set
 If the original extension runs, a user event will be generated that makes 
the test fail

 2 - Remove an entire existing extension
 If the manager command fails, a failure token will be set
 If the original extension runs, a user event will be generated that makes 
the test fail

 3 - Add an extension
 If the manager command fails, a failure token will be set
 If the extension fails to run, an expected user event will not be 
generated and the test will fail

 4 - Add an extension with a CID match that doesn't match the originated channel
 If the manager command fails, a failure token will be set
 If the extension runs, a user event will be generated that makes the test 
fail

 5 - Add an extension with a CID match that should match the originated channel
 If the manager command fails, a failure token will be set
 If the extension fails to run, an expected user event will not be 
generated and the test will fail

 6 - Add an extension that replaces an existing priority
 If the manager command fails, a failure token will be set
 If the original extension runs, a user event will be generated that makes 
the test fail
 If the replacement extension doesn't run, an expected user event will not 
be generated and the test will fail

 7 - Attempt to add an extension that would replace an existing priority, but 
don't allow replacement
 If the manager command doesn't fail, a failure token will be set
 If the original extension doesn't run, an expected user event will not be 
generated and the test will fail
 If the replacement extension runs, a user event will be generated that 
makes the test fail

 8 - Remove an extension at a specific priority with caller ID matching
 If the manager command fails, a failure token will be set
 If the original extension runs, a user event will be generated that makes 
the test fail
 The originate is checked by means of a user event on a separate priority 
taht is not removed

 9 - Attempt DialplanAddExtension without priority set
 If the manager command doesn't fail, a failure token will be set

10 - Attempt DialplanAddExtension without application set
 If the manager command doesn't fail, a failure token will be set

11 - Attempt DialplanRemoveExtension on an extension that does not exist
 If the manager command doesn't fail, a failure token will be set


Diffs
-

  /asterisk/trunk/tests/pbx/tests.yaml 5144 
  /asterisk/trunk/tests/pbx/manager_extensions/test-config.yaml PRE-CREATION 
  /asterisk/trunk/tests/pbx/manager_extensions/configs/ast1/extensions.conf 
PRE-CREATION 
  /asterisk/trunk/tests/pbx/manager_extensions/ami_extension_control.py 
PRE-CREATION 

Diff: https://reviewboard.asterisk.org/r/3660/diff/


Testing
---

Removed execution of many of the test AMI commands to guarantee that if above 
failures occurred that the test would fail


Thanks,

Jonathan Rose

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Re: [asterisk-dev] [Code Review] 3660: testsuite: A rather comprehensive set of tests for DialplanAdd/RemoveExtension AMI commands

2014-06-26 Thread Jonathan Rose

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

(Updated June 26, 2014, 2:33 p.m.)


Review request for Asterisk Developers, kmoore and Matt Jordan.


Changes
---

Address Matt's comments, keeping in mind that the type checking for responses 
is still there, just explained via comments now.


Repository: testsuite


Description
---

11 part test:
 1 - Remove an extension with a priority
 If the manager command fails, a failure token will be set
 If the original extension runs, a user event will be generated that makes 
the test fail

 2 - Remove an entire existing extension
 If the manager command fails, a failure token will be set
 If the original extension runs, a user event will be generated that makes 
the test fail

 3 - Add an extension
 If the manager command fails, a failure token will be set
 If the extension fails to run, an expected user event will not be 
generated and the test will fail

 4 - Add an extension with a CID match that doesn't match the originated channel
 If the manager command fails, a failure token will be set
 If the extension runs, a user event will be generated that makes the test 
fail

 5 - Add an extension with a CID match that should match the originated channel
 If the manager command fails, a failure token will be set
 If the extension fails to run, an expected user event will not be 
generated and the test will fail

 6 - Add an extension that replaces an existing priority
 If the manager command fails, a failure token will be set
 If the original extension runs, a user event will be generated that makes 
the test fail
 If the replacement extension doesn't run, an expected user event will not 
be generated and the test will fail

 7 - Attempt to add an extension that would replace an existing priority, but 
don't allow replacement
 If the manager command doesn't fail, a failure token will be set
 If the original extension doesn't run, an expected user event will not be 
generated and the test will fail
 If the replacement extension runs, a user event will be generated that 
makes the test fail

 8 - Remove an extension at a specific priority with caller ID matching
 If the manager command fails, a failure token will be set
 If the original extension runs, a user event will be generated that makes 
the test fail
 The originate is checked by means of a user event on a separate priority 
taht is not removed

 9 - Attempt DialplanAddExtension without priority set
 If the manager command doesn't fail, a failure token will be set

10 - Attempt DialplanAddExtension without application set
 If the manager command doesn't fail, a failure token will be set

11 - Attempt DialplanRemoveExtension on an extension that does not exist
 If the manager command doesn't fail, a failure token will be set


Diffs (updated)
-

  /asterisk/trunk/tests/pbx/tests.yaml 5144 
  /asterisk/trunk/tests/pbx/manager_extensions/test-config.yaml PRE-CREATION 
  /asterisk/trunk/tests/pbx/manager_extensions/configs/ast1/extensions.conf 
PRE-CREATION 
  /asterisk/trunk/tests/pbx/manager_extensions/ami_extension_control.py 
PRE-CREATION 

Diff: https://reviewboard.asterisk.org/r/3660/diff/


Testing
---

Removed execution of many of the test AMI commands to guarantee that if above 
failures occurred that the test would fail


Thanks,

Jonathan Rose

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Re: [asterisk-dev] [Code Review] 3660: testsuite: A rather comprehensive set of tests for DialplanAdd/RemoveExtension AMI commands

2014-06-26 Thread Jonathan Rose


> On June 26, 2014, 10:27 a.m., Matt Jordan wrote:
> > /asterisk/trunk/tests/pbx/manager_extensions/ami_extension_control.py, line 
> > 30
> > 
> >
> > If you're going to explicitly lower the default reactor timeout, then 
> > you should reset the reactor timeout periodically. You don't know how slow 
> > a build agent will run.

No need to reset. The originates all happen fairly instantaneously. I'll just 
drop the timeout.  This test completes within 3 seconds on my box and I was 
mostly just trying to save time while developing the test, but if we want to be 
safe letting it go for the full 30 is fine.


- Jonathan


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


On June 20, 2014, 1:42 p.m., Jonathan Rose wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3660/
> ---
> 
> (Updated June 20, 2014, 1:42 p.m.)
> 
> 
> Review request for Asterisk Developers, kmoore and Matt Jordan.
> 
> 
> Repository: testsuite
> 
> 
> Description
> ---
> 
> 11 part test:
>  1 - Remove an extension with a priority
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
> 
>  2 - Remove an entire existing extension
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
> 
>  3 - Add an extension
>  If the manager command fails, a failure token will be set
>  If the extension fails to run, an expected user event will not be 
> generated and the test will fail
> 
>  4 - Add an extension with a CID match that doesn't match the originated 
> channel
>  If the manager command fails, a failure token will be set
>  If the extension runs, a user event will be generated that makes the 
> test fail
> 
>  5 - Add an extension with a CID match that should match the originated 
> channel
>  If the manager command fails, a failure token will be set
>  If the extension fails to run, an expected user event will not be 
> generated and the test will fail
> 
>  6 - Add an extension that replaces an existing priority
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
>  If the replacement extension doesn't run, an expected user event will 
> not be generated and the test will fail
> 
>  7 - Attempt to add an extension that would replace an existing priority, but 
> don't allow replacement
>  If the manager command doesn't fail, a failure token will be set
>  If the original extension doesn't run, an expected user event will not 
> be generated and the test will fail
>  If the replacement extension runs, a user event will be generated that 
> makes the test fail
> 
>  8 - Remove an extension at a specific priority with caller ID matching
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
>  The originate is checked by means of a user event on a separate priority 
> taht is not removed
> 
>  9 - Attempt DialplanAddExtension without priority set
>  If the manager command doesn't fail, a failure token will be set
> 
> 10 - Attempt DialplanAddExtension without application set
>  If the manager command doesn't fail, a failure token will be set
> 
> 11 - Attempt DialplanRemoveExtension on an extension that does not exist
>  If the manager command doesn't fail, a failure token will be set
> 
> 
> Diffs
> -
> 
>   /asterisk/trunk/tests/pbx/tests.yaml 5144 
>   /asterisk/trunk/tests/pbx/manager_extensions/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/pbx/manager_extensions/configs/ast1/extensions.conf 
> PRE-CREATION 
>   /asterisk/trunk/tests/pbx/manager_extensions/ami_extension_control.py 
> PRE-CREATION 
> 
> Diff: https://reviewboard.asterisk.org/r/3660/diff/
> 
> 
> Testing
> ---
> 
> Removed execution of many of the test AMI commands to guarantee that if above 
> failures occurred that the test would fail
> 
> 
> Thanks,
> 
> Jonathan Rose
> 
>

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Re: [asterisk-dev] [Code Review] 3660: testsuite: A rather comprehensive set of tests for DialplanAdd/RemoveExtension AMI commands

2014-06-26 Thread Jonathan Rose


> On June 26, 2014, 10:27 a.m., Matt Jordan wrote:
> > /asterisk/trunk/tests/pbx/manager_extensions/ami_extension_control.py, 
> > lines 48-49
> > 
> >
> > Why are these type checks necessary? When does AMIProtocol send you 
> > something other than a dictionary as the response?

Yes. At the end of the AMI session, it will respond with a string indicating 
that the session has ended and if I don't include these type checks this causes 
the test to spit up backtraces for every AMI action I defined in the config.


- Jonathan


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


On June 20, 2014, 1:42 p.m., Jonathan Rose wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3660/
> ---
> 
> (Updated June 20, 2014, 1:42 p.m.)
> 
> 
> Review request for Asterisk Developers, kmoore and Matt Jordan.
> 
> 
> Repository: testsuite
> 
> 
> Description
> ---
> 
> 11 part test:
>  1 - Remove an extension with a priority
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
> 
>  2 - Remove an entire existing extension
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
> 
>  3 - Add an extension
>  If the manager command fails, a failure token will be set
>  If the extension fails to run, an expected user event will not be 
> generated and the test will fail
> 
>  4 - Add an extension with a CID match that doesn't match the originated 
> channel
>  If the manager command fails, a failure token will be set
>  If the extension runs, a user event will be generated that makes the 
> test fail
> 
>  5 - Add an extension with a CID match that should match the originated 
> channel
>  If the manager command fails, a failure token will be set
>  If the extension fails to run, an expected user event will not be 
> generated and the test will fail
> 
>  6 - Add an extension that replaces an existing priority
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
>  If the replacement extension doesn't run, an expected user event will 
> not be generated and the test will fail
> 
>  7 - Attempt to add an extension that would replace an existing priority, but 
> don't allow replacement
>  If the manager command doesn't fail, a failure token will be set
>  If the original extension doesn't run, an expected user event will not 
> be generated and the test will fail
>  If the replacement extension runs, a user event will be generated that 
> makes the test fail
> 
>  8 - Remove an extension at a specific priority with caller ID matching
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
>  The originate is checked by means of a user event on a separate priority 
> taht is not removed
> 
>  9 - Attempt DialplanAddExtension without priority set
>  If the manager command doesn't fail, a failure token will be set
> 
> 10 - Attempt DialplanAddExtension without application set
>  If the manager command doesn't fail, a failure token will be set
> 
> 11 - Attempt DialplanRemoveExtension on an extension that does not exist
>  If the manager command doesn't fail, a failure token will be set
> 
> 
> Diffs
> -
> 
>   /asterisk/trunk/tests/pbx/tests.yaml 5144 
>   /asterisk/trunk/tests/pbx/manager_extensions/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/pbx/manager_extensions/configs/ast1/extensions.conf 
> PRE-CREATION 
>   /asterisk/trunk/tests/pbx/manager_extensions/ami_extension_control.py 
> PRE-CREATION 
> 
> Diff: https://reviewboard.asterisk.org/r/3660/diff/
> 
> 
> Testing
> ---
> 
> Removed execution of many of the test AMI commands to guarantee that if above 
> failures occurred that the test would fail
> 
> 
> Thanks,
> 
> Jonathan Rose
> 
>

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Re: [asterisk-dev] [Code Review] 3660: testsuite: A rather comprehensive set of tests for DialplanAdd/RemoveExtension AMI commands

2014-06-26 Thread Jonathan Rose


> On June 26, 2014, 10:27 a.m., Matt Jordan wrote:
> > /asterisk/trunk/tests/pbx/manager_extensions/ami_extension_control.py, line 
> > 39
> > 
> >
> > This should not set the test to pass here. You should only pass the 
> > test if the channels that are originated are successfully created (that is, 
> > answered).
> > 
> > You can use a deferred list to gather up the deferreds returned by the 
> > AMIProtocol originate. When all deferreds have fired, the deferred list 
> > will fire, which will call the callback you've defined for the deferred 
> > list. By default, the first parameter passed to a callback of a deferred 
> > list is a list of tuples (success, result) where success is a boolean 
> > indicating whether or not the callback succeeded. You can then set the test 
> > to passed if all of the originates succeeded.
> > 
> > Something like:
> > 
> > def _pass_test(results, test_object):
> > passed = all([result[0] for result in results if result[0])
> > test_object.set_passed(passed)
> > 
> > deferds = []
> > for channel in self.originates:
> > deferred = self.ami.originate(...)
> > deferred.addErrback(self.handle_originate_failure)
> > deferds.append(deferred)
> > 
> > 
> > deferred_list = defer.DeferredList(deferds)
> > deferred_list.addCallback(_pass_test, self)
> >
> 
> Jonathan Rose wrote:
> "You should only pass the test if the channels that are originated are 
> successfully created (that is, answered)"
> 
> That isn't going to be the case for all originates by design. When 
> attempting to originate to an extension that has been deleted, the call isn't 
> meant to be answered.

Ah, on second thought I can get around that by just having an extension that 
matches on everything and creates an event for ending up there.


- Jonathan


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


On June 20, 2014, 1:42 p.m., Jonathan Rose wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3660/
> ---
> 
> (Updated June 20, 2014, 1:42 p.m.)
> 
> 
> Review request for Asterisk Developers, kmoore and Matt Jordan.
> 
> 
> Repository: testsuite
> 
> 
> Description
> ---
> 
> 11 part test:
>  1 - Remove an extension with a priority
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
> 
>  2 - Remove an entire existing extension
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
> 
>  3 - Add an extension
>  If the manager command fails, a failure token will be set
>  If the extension fails to run, an expected user event will not be 
> generated and the test will fail
> 
>  4 - Add an extension with a CID match that doesn't match the originated 
> channel
>  If the manager command fails, a failure token will be set
>  If the extension runs, a user event will be generated that makes the 
> test fail
> 
>  5 - Add an extension with a CID match that should match the originated 
> channel
>  If the manager command fails, a failure token will be set
>  If the extension fails to run, an expected user event will not be 
> generated and the test will fail
> 
>  6 - Add an extension that replaces an existing priority
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
>  If the replacement extension doesn't run, an expected user event will 
> not be generated and the test will fail
> 
>  7 - Attempt to add an extension that would replace an existing priority, but 
> don't allow replacement
>  If the manager command doesn't fail, a failure token will be set
>  If the original extension doesn't run, an expected user event will not 
> be generated and the test will fail
>  If the replacement extension runs, a user event will be generated that 
> makes the test fail
> 
>  8 - Remove an extension at a specific priority with caller ID matching
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
>  The originate is checked by means of a user event on a separate priority 
> taht is not removed
> 
>  9 - Attempt DialplanAddExtension without priority set
>  If the manager command doesn't fail, a failure toke

Re: [asterisk-dev] [Code Review] 3660: testsuite: A rather comprehensive set of tests for DialplanAdd/RemoveExtension AMI commands

2014-06-26 Thread Jonathan Rose


> On June 26, 2014, 10:27 a.m., Matt Jordan wrote:
> > /asterisk/trunk/tests/pbx/manager_extensions/ami_extension_control.py, line 
> > 39
> > 
> >
> > This should not set the test to pass here. You should only pass the 
> > test if the channels that are originated are successfully created (that is, 
> > answered).
> > 
> > You can use a deferred list to gather up the deferreds returned by the 
> > AMIProtocol originate. When all deferreds have fired, the deferred list 
> > will fire, which will call the callback you've defined for the deferred 
> > list. By default, the first parameter passed to a callback of a deferred 
> > list is a list of tuples (success, result) where success is a boolean 
> > indicating whether or not the callback succeeded. You can then set the test 
> > to passed if all of the originates succeeded.
> > 
> > Something like:
> > 
> > def _pass_test(results, test_object):
> > passed = all([result[0] for result in results if result[0])
> > test_object.set_passed(passed)
> > 
> > deferds = []
> > for channel in self.originates:
> > deferred = self.ami.originate(...)
> > deferred.addErrback(self.handle_originate_failure)
> > deferds.append(deferred)
> > 
> > 
> > deferred_list = defer.DeferredList(deferds)
> > deferred_list.addCallback(_pass_test, self)
> >

"You should only pass the test if the channels that are originated are 
successfully created (that is, answered)"

That isn't going to be the case for all originates by design. When attempting 
to originate to an extension that has been deleted, the call isn't meant to be 
answered.


- Jonathan


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


On June 20, 2014, 1:42 p.m., Jonathan Rose wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3660/
> ---
> 
> (Updated June 20, 2014, 1:42 p.m.)
> 
> 
> Review request for Asterisk Developers, kmoore and Matt Jordan.
> 
> 
> Repository: testsuite
> 
> 
> Description
> ---
> 
> 11 part test:
>  1 - Remove an extension with a priority
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
> 
>  2 - Remove an entire existing extension
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
> 
>  3 - Add an extension
>  If the manager command fails, a failure token will be set
>  If the extension fails to run, an expected user event will not be 
> generated and the test will fail
> 
>  4 - Add an extension with a CID match that doesn't match the originated 
> channel
>  If the manager command fails, a failure token will be set
>  If the extension runs, a user event will be generated that makes the 
> test fail
> 
>  5 - Add an extension with a CID match that should match the originated 
> channel
>  If the manager command fails, a failure token will be set
>  If the extension fails to run, an expected user event will not be 
> generated and the test will fail
> 
>  6 - Add an extension that replaces an existing priority
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
>  If the replacement extension doesn't run, an expected user event will 
> not be generated and the test will fail
> 
>  7 - Attempt to add an extension that would replace an existing priority, but 
> don't allow replacement
>  If the manager command doesn't fail, a failure token will be set
>  If the original extension doesn't run, an expected user event will not 
> be generated and the test will fail
>  If the replacement extension runs, a user event will be generated that 
> makes the test fail
> 
>  8 - Remove an extension at a specific priority with caller ID matching
>  If the manager command fails, a failure token will be set
>  If the original extension runs, a user event will be generated that 
> makes the test fail
>  The originate is checked by means of a user event on a separate priority 
> taht is not removed
> 
>  9 - Attempt DialplanAddExtension without priority set
>  If the manager command doesn't fail, a failure token will be set
> 
> 10 - Attempt DialplanAddExtension without application set
>  If the manager command doesn't fail, a failure token will be set
> 
> 11 - Attempt DialplanRemoveExtension o

Re: [asterisk-dev] [Code Review] 3660: testsuite: A rather comprehensive set of tests for DialplanAdd/RemoveExtension AMI commands

2014-06-26 Thread Matt Jordan

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



/asterisk/trunk/tests/pbx/manager_extensions/ami_extension_control.py


There's no reason to define an Originate as a generic message. The starpy 
AMIProtocol already defines an explicit method for origination.



/asterisk/trunk/tests/pbx/manager_extensions/ami_extension_control.py


Since you've decided to implement a new test object for your test, you 
should make sure it passes pylint. That means all of your class declarations 
and function definitions should have Pydoc comments



/asterisk/trunk/tests/pbx/manager_extensions/ami_extension_control.py


If you're going to explicitly lower the default reactor timeout, then you 
should reset the reactor timeout periodically. You don't know how slow a build 
agent will run.



/asterisk/trunk/tests/pbx/manager_extensions/ami_extension_control.py


Pydoc comments



/asterisk/trunk/tests/pbx/manager_extensions/ami_extension_control.py


(1) You don't need a global for this. You can just use the originate method 
on the AMIProtocol.

(2) Add the default error handler for originates, defined in TestCase. That 
way, if for whatever reason a channel doesn't get answered, your test will fail 
appropriately.



/asterisk/trunk/tests/pbx/manager_extensions/ami_extension_control.py


This should not set the test to pass here. You should only pass the test if 
the channels that are originated are successfully created (that is, answered).

You can use a deferred list to gather up the deferreds returned by the 
AMIProtocol originate. When all deferreds have fired, the deferred list will 
fire, which will call the callback you've defined for the deferred list. By 
default, the first parameter passed to a callback of a deferred list is a list 
of tuples (success, result) where success is a boolean indicating whether or 
not the callback succeeded. You can then set the test to passed if all of the 
originates succeeded.

Something like:

def _pass_test(results, test_object):
passed = all([result[0] for result in results if result[0])
test_object.set_passed(passed)

deferds = []
for channel in self.originates:
deferred = self.ami.originate(...)
deferred.addErrback(self.handle_originate_failure)
deferds.append(deferred)


deferred_list = defer.DeferredList(deferds)
deferred_list.addCallback(_pass_test, self)




/asterisk/trunk/tests/pbx/manager_extensions/ami_extension_control.py


Pydoc



/asterisk/trunk/tests/pbx/manager_extensions/ami_extension_control.py


(1) This method is named poorly. What are we expecting?

(2) Since this is a response callback function for an executed action, and 
is called no where else, this method could be scoped under the ami_connect 
method. It does not need to be scoped at the class level.

(3) And Pydoc this as well.



/asterisk/trunk/tests/pbx/manager_extensions/ami_extension_control.py


Why are these type checks necessary? When does AMIProtocol send you 
something other than a dictionary as the response?



/asterisk/trunk/tests/pbx/manager_extensions/ami_extension_control.py


(1) This method is named poorly. What are we unexpecting?

(2) Since this is a response callback function for an executed action, and 
is called no where else, this method could be scoped under the ami_connect 
method. It does not need to be scoped at the class level.

(3) And Pydoc this as well.



/asterisk/trunk/tests/pbx/manager_extensions/ami_extension_control.py


Py to the Doc



/asterisk/trunk/tests/pbx/manager_extensions/ami_extension_control.py


And one more time: PyDoc



/asterisk/trunk/tests/pbx/manager_extensions/ami_extension_control.py


"Command" should be lower case.



/asterisk/trunk/tests/pbx/manager_extensions/ami_extension_control.py


Change this to "expected-response"



/asterisk/trunk/tests/pbx/manager_extensions/test-config.yaml