[asterisk-dev] [Code Review] 2736: pjsip tests: nominal and off-nominal inbound unregistrations

Matt Jordan reviewboard at asterisk.org
Mon Aug 5 13:16:53 CDT 2013


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



/asterisk/trunk/tests/channels/pjsip/registration/inbound/off-nominal/unregister/tests.yaml
<https://reviewboard.asterisk.org/r/2736/#comment18391>

    I'd rename this one from single_contact to something else. The test isn't checking unregistration of a single contact, it's checking that if we don't provide an Expires header we reject the request.
    
    How about 'no_expire'?


- Matt Jordan


On Aug. 2, 2013, 10:25 p.m., jbigelow wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2736/
> -----------------------------------------------------------
> 
> (Updated Aug. 2, 2013, 10:25 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Repository: testsuite
> 
> 
> Description
> -------
> 
> This test sends registrations over IPv4/IPv6 and UDP/TCP to test nominal and off-nominal inbound unregistrations. This covers tests 1, 2, and 3 of the nominal tests and test 1 of the off-nominal tests listed on the test plan page of the wiki.
> 
> A single ast_test_suite_event_notify was added to res_pjsip_registrar.c to make the 'all_contacts' test possible. An ast_verb was also added to be consistent but none of these tests depend on it. See review 2739 (https://reviewboard.asterisk.org/r/2739/)
> 
> Nominal unregister tests:
> * single_contact - first register a contact and then immediately unregister the contact. This ensures that by setting a value of 0 in the Expires header, the contact is unregistered from Asterisk.
> 
> * multiple_contacts - first register contacts and then immediately unregister the contacts using an Expires header of 0. This is repeated again except for unregistration the Expires header is set to none 0 and the expires parameter is set to 0 for the contacts. This ensures that both methods cause the contacts to be unregistered from Asterisk.
> 
> * all_contacts - first register contacts and then immediately unregister all contacts specifing a Contact header of "*" and an Expires header of 0. This ensures that using a "*" for the Contact header causes Asterisk to unregister all contacts for each AOR.
> 
> Off-nominal unregister tests:
> * single_contact - first register a contact and then immediately attempt to unregister the contact by using "*" for the Contact header and without an Expires header present. This ensures that Asterisk rejects the unregistration attempt since it is invalid.
> 
> 
> Diffs
> -----
> 
>   /asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/tests.yaml PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/unregister/all_contacts/configs/ast1/pjsip.conf PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/unregister/all_contacts/sipp/register-noauth-ipv4.xml PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/unregister/all_contacts/sipp/register-noauth-ipv6.xml PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/unregister/all_contacts/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/unregister/multiple_contacts/configs/ast1/pjsip.conf PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/unregister/multiple_contacts/sipp/register-noauth-ipv4.xml PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/unregister/multiple_contacts/sipp/register-noauth-ipv6.xml PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/unregister/multiple_contacts/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/unregister/single_contact/configs/ast1/pjsip.conf PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/unregister/single_contact/sipp/register-noauth.xml PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/unregister/single_contact/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/registration/inbound/nominal/unregister/tests.yaml PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/registration/inbound/off-nominal/tests.yaml PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/registration/inbound/off-nominal/unregister/single_contact/configs/ast1/pjsip.conf PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/registration/inbound/off-nominal/unregister/single_contact/sipp/register-noauth.xml PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/registration/inbound/off-nominal/unregister/single_contact/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/registration/inbound/off-nominal/unregister/tests.yaml PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/registration/inbound/tests.yaml PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/registration/tests.yaml PRE-CREATION 
>   /asterisk/trunk/tests/channels/pjsip/tests.yaml 3972 
> 
> Diff: https://reviewboard.asterisk.org/r/2736/diff/
> 
> 
> Testing
> -------
> 
> * Ensured the tests fail if:
> - the Test Events aren't received or do not match. (all tests)
> - the contact header(s) exists when it shouldn't. (nominal tests 1, 2, and 3)
> - contacts are not unregistered. (nominal tests 1, 2, and 3)
> - a 400 Bad Request isn't received from Asterisk. (off-nominal test 1)
> * Review logs to ensure that the registrations were using all the combinations of IPv4/IPv6 and UDP/TCP.
> 
> 
> Thanks,
> 
> jbigelow
> 
>

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


More information about the asterisk-dev mailing list