<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://reviewboard.asterisk.org/r/2013/">https://reviewboard.asterisk.org/r/2013/</a>
     </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On July 12th, 2012, 2:49 p.m., <b>Matt Jordan</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Assuming the generic_ccss/pre-dial tests are a goof on the merge, this looks good to go.</pre>
 </blockquote>







</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Yeah, not sure exactly how they made it here.

The way I generated my diff for this review was to an svn diff for the revisions of the bridge-tests branch between when I branched it and my most recent commit. I suppose at some point that I must have done an svn update that pulled in the generic_ccss and predial changes. I suppose I should start doing temporary merges to trunk and using post-review from there instead.</pre>
<br />








<p>- Mark</p>


<br />
<p>On July 11th, 2012, 2:56 p.m., Mark Michelson wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for Asterisk Developers and Matt Jordan.</div>
<div>By Mark Michelson.</div>


<p style="color: grey;"><i>Updated July 11, 2012, 2:56 p.m.</i></p>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This is a new pluggable module for the Asterisk test suite intended to be used to verify AMI events.

There are two ways that this may be used.

* &quot;headermatch&quot;: This is the simpler of the two methods. When user-specified conditions are met, then headers in an AMI event are checked for expected values. If the check fails, then the test fails as well.
* &quot;callback&quot;: For cases where more complicated checks are required than just AMI headers, then a user-defined callback may be called instead. This allows for the user to maintain their own test state to determine if the test has passed or failed.

There are some changes made outside the AMI module as well.

* TestCase has been updated to have a set_passed() method. Instead of directly modifying the &#39;passed&#39; field of a test object, this method should be called. This way, if one module fails, other modules cannot override the failed state of the test. The CDR and ForkCDR modules have been updated accordingly
* TestRunner has been modified to get rid of the &quot;load-from-test&quot; option. Instead, when module configuration is loaded, it automatically loads the test path into its loader&#39;s supported paths. This was done to get around a situation where I wanted the test path added to the supported paths but did not want the TestRunner to actually load the module in that path.

I have also included a sample YAML file that details the options available for the AMI module.</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I tested this by tweaking the cdr_userfield test with different values. The only option that is not thoroughly tested is the &#39;id&#39; field since SimpleTestCase only uses a single Asterisk instance. The intention, once this gets committed, is to use this in a battery of Bridging tests that will be written in the near future.</pre>
  </td>
 </tr>
</table>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>/asterisk/team/mmichelson/bridge-tests/lib/python/asterisk/TestCase.py <span style="color: grey">(3290)</span></li>

 <li>/asterisk/team/mmichelson/bridge-tests/lib/python/asterisk/TestRunner.py <span style="color: grey">(3290)</span></li>

 <li>/asterisk/team/mmichelson/bridge-tests/lib/python/asterisk/ami.py <span style="color: grey">(3290)</span></li>

 <li>/asterisk/team/mmichelson/bridge-tests/lib/python/asterisk/asterisk.py <span style="color: grey">(3290)</span></li>

 <li>/asterisk/team/mmichelson/bridge-tests/lib/python/asterisk/cdr.py <span style="color: grey">(3290)</span></li>

 <li>/asterisk/team/mmichelson/bridge-tests/sample-yaml/ami-config.yaml.sample <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/asterisk/team/mmichelson/bridge-tests/tests/cdr/ForkCdrModule.py <span style="color: grey">(3290)</span></li>

 <li>/asterisk/team/mmichelson/bridge-tests/tests/cdr/cdr_fork_end_time/test-config.yaml <span style="color: grey">(3290)</span></li>

 <li>/asterisk/team/mmichelson/bridge-tests/tests/cdr/console_fork_after_busy_forward/test-config.yaml <span style="color: grey">(3290)</span></li>

 <li>/asterisk/team/mmichelson/bridge-tests/tests/cdr/console_fork_before_dial/test-config.yaml <span style="color: grey">(3290)</span></li>

 <li>/asterisk/team/mmichelson/bridge-tests/tests/channels/SIP/generic_ccss/configs/ast2/extensions.conf <span style="color: grey">(3290)</span></li>

 <li>/asterisk/team/mmichelson/bridge-tests/tests/channels/SIP/generic_ccss/run-test <span style="color: grey">(3290)</span></li>

 <li>/asterisk/team/mmichelson/bridge-tests/tests/predial/configs/ast1/extensions.conf <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/asterisk/team/mmichelson/bridge-tests/tests/predial/configs/ast1/followme.conf <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/asterisk/team/mmichelson/bridge-tests/tests/predial/run-test <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/asterisk/team/mmichelson/bridge-tests/tests/predial/test-config.yaml <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/asterisk/team/mmichelson/bridge-tests/tests/tests.yaml <span style="color: grey">(3290)</span></li>

</ul>

<p><a href="https://reviewboard.asterisk.org/r/2013/diff/" style="margin-left: 3em;">View Diff</a></p>




  </td>
 </tr>
</table>








  </div>
 </body>
</html>