[asterisk-dev] [Code Review] sip_tls_call test added to external test suite

jrose reviewboard at asterisk.org
Mon Jun 27 08:20:47 CDT 2011



> On 2011-06-24 11:28:08, Paul Belanger wrote:
> > /asterisk/trunk/tests/channels/SIP/sip_tls_call/configs/ast1/extensions.conf, lines 8-10
> > <https://reviewboard.asterisk.org/r/1276/diff/7/?file=17199#file17199line8>
> >
> >     We may have to change this logic a bit, I've found that Wait() logic in the Dialplan not to be reliable. Many outside factors could affect the timing of this.
> >     
> >     For an example, look at feature_attended_transfer and how we use Background() with SendDTMF().

Replaced with background(silence/x) for all waits.


> On 2011-06-24 11:28:08, Paul Belanger wrote:
> > /asterisk/trunk/tests/channels/SIP/sip_tls_call/run-test, lines 58-59
> > <https://reviewboard.asterisk.org/r/1276/diff/7/?file=17219#file17219line58>
> >
> >     Move this to the top of your code block.  This will sandbox the 2 instances of asterisk first, allowing you to get access to self.options.base, self.options.test_name and self.asterisk.base, the path names for directories, allowing you to build the path names.

Check.


> On 2011-06-24 11:28:08, Paul Belanger wrote:
> > /asterisk/trunk/tests/channels/SIP/sip_tls_call/run-test, lines 46-56
> > <https://reviewboard.asterisk.org/r/1276/diff/7/?file=17219#file17219line46>
> >
> >     I'm still not a fan of this code.  One thing that I do notice, we are modify configuration files out side of the sandbox'd instances of Asterisk. 
> >     
> >     As you re-run the test, we update files that previous sandbox'd versions of the test depend on.  Changing the behavior of a previous run test.
> >     
> >     I started work on something last night which should help address my comments, but requires an update to the testsuite.

Well, strictly speaking the keys shouldn't ever be changing and the only reason I'm deleting and recopying the keys is in case the tester has generated a new set of keys for the test.  Since you are working on something relevant though, I'm curious what it is.  In the meantime, I suppose it's also technically true that removing the keys, even if only for a little while by running the test twice at nearby times, one could superficially fail the test if one instance tried to use the key when the other had just deleted it.  I suppose that problem could be mitigated if each test ran in its own folder.  In the meantime, I could prevent that from happening by putting the keys in folders numbered based on the ast# folders in use for the current test if there is a way to get those values, which I'm guessing there is based on the below comment.

So for...
ast1 and ast2, you'd have...
keys1

and for ast3 and ast4, you'd have...
keys2

Of course, it'd probably be a little cleaner if instead of that, you simply had a folder for each complete test, but I'm not sure if that's what you had in mind.


> On 2011-06-24 11:28:08, Paul Belanger wrote:
> > /asterisk/trunk/tests/channels/SIP/sip_tls_call/run-test, lines 81-86
> > <https://reviewboard.asterisk.org/r/1276/diff/7/?file=17219#file17219line81>
> >
> >     Be sure to check the ami.id, to find out which instance of asterisk this call back is running on.  Then you can confirm you have the right instance to check the digit event.

Check.


For the moment, I'm still not sure what you want me to do with the key copying bit.  I'll wait on some feedback for that.


- jrose


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


On 2011-06-24 10:10:21, jrose wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1276/
> -----------------------------------------------------------
> 
> (Updated 2011-06-24 10:10:21)
> 
> 
> Review request for Asterisk Developers, Russell Bryant, David Vossel, and Paul Belanger.
> 
> 
> Summary
> -------
> 
> First, you can ignore the text files.  spacespacespace.txt was just used while I was working out shell command stuff and I accidentally added it to this diff and I've also removed test-output.txt.
> 
> I'm still not perfectly sure how this is going to work with the cert files.  I'd guess it'll be fine regardless of the machine, but I haven't tested this on another machine yet that didn't create these cert files.
> 
> This test uses the basic-call test in IAX2 as a base.
> 
> 
> Diffs
> -----
> 
>   /asterisk/trunk/tests/channels/SIP/sip_tls_call/configs/ast1/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/sip_tls_call/configs/ast1/manager.general.conf.inc PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/sip_tls_call/configs/ast1/sip.conf PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/sip_tls_call/configs/ast2/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/sip_tls_call/configs/ast2/manager.general.conf.inc PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/sip_tls_call/configs/ast2/sip.conf PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/sip_tls_call/configs/helper1 PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/sip_tls_call/configs/helper2 PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/sip_tls_call/configs/keys/ca.cfg PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/sip_tls_call/configs/keys/ca.crt PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/sip_tls_call/configs/keys/ca.key PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/sip_tls_call/configs/keys/serverA.crt PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/sip_tls_call/configs/keys/serverA.csr PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/sip_tls_call/configs/keys/serverA.key PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/sip_tls_call/configs/keys/serverA.pem PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/sip_tls_call/configs/keys/serverB.crt PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/sip_tls_call/configs/keys/serverB.csr PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/sip_tls_call/configs/keys/serverB.key PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/sip_tls_call/configs/keys/serverB.pem PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/sip_tls_call/configs/keys/tmp.cfg PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/sip_tls_call/run-test PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/sip_tls_call/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/channels/SIP/tests.yaml 1671 
> 
> Diff: https://reviewboard.asterisk.org/r/1276/diff
> 
> 
> Testing
> -------
> 
> How did I test the test?  Mostly by checking the sip debug logs to make sure the call was going through as a SIP/TLS call.  The usual flow of SIP messages was there and it resembled my regular SIP/TLS calls.
> 
> 
> Thanks,
> 
> jrose
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20110627/748eb37b/attachment-0001.htm>


More information about the asterisk-dev mailing list