[asterisk-commits] mmichelson: testsuite/asterisk/trunk r4183 - in /asterisk/trunk/tests/channel...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Sep 13 09:46:36 CDT 2013
Author: mmichelson
Date: Fri Sep 13 09:46:30 2013
New Revision: 4183
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=4183
Log:
Adds tests for outbound authentication.
Review: https://reviewboard.asterisk.org/r/2829
Added:
asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/
asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/configs/
asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/configs/ast1/
asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/configs/ast1/extensions.conf (with props)
asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/configs/ast1/pjsip.conf (with props)
asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/configs/ast2/
asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/configs/ast2/extensions.conf (with props)
asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/configs/ast2/pjsip.conf (with props)
asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/test-config.yaml (with props)
Modified:
asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/tests.yaml
Added: asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/configs/ast1/extensions.conf?view=auto&rev=4183
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/configs/ast1/extensions.conf Fri Sep 13 09:46:30 2013
@@ -1,0 +1,6 @@
+[default]
+exten => success,1,UserEvent(CallResult, result: success)
+same => n,Echo()
+[default]
+exten => success,1,UserEvent(CallResult, result: success)
+same => n,Echo()
Propchange: asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/configs/ast1/extensions.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/configs/ast1/pjsip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/configs/ast1/pjsip.conf?view=auto&rev=4183
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/configs/ast1/pjsip.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/configs/ast1/pjsip.conf Fri Sep 13 09:46:30 2013
@@ -1,0 +1,110 @@
+[transport-udp]
+type=transport
+protocol=udp
+bind=127.0.0.1:5061
+external_signaling_address=127.0.0.1:5061
+
+[bob-endpoint-template](!)
+type=endpoint
+aors=aor-bob
+fromuser=uut
+transport=transport-udp
+
+[bob1](bob-endpoint-template)
+outbound_auth=auth-bob1
+
+[bob2](bob-endpoint-template)
+outbound_auth=auth-bob2
+
+[bob3](bob-endpoint-template)
+outbound_auth=auth-bob3
+
+[bob4](bob-endpoint-template)
+outbound_auth=auth-bob4
+
+[aor-bob]
+type=aor
+contact=sip:bob at 127.0.0.1:5060
+
+[auth-bob1]
+; Explicit realm, userpass
+type=auth
+username=uut
+password=uut
+realm=example.org
+
+[auth-bob2]
+; No realm, userpass
+type=auth
+username=uut
+password=uut
+
+[auth-bob3]
+; explicit realm, md5
+type=auth
+auth_type=md5
+username=uut
+md5_cred=2f9299a02c0657d35d9b60a86b8cfe13
+realm=example.org
+
+[auth-bob4]
+; no realm, md5
+type=auth
+auth_type=md5
+username=uut
+md5_cred=2f9299a02c0657d35d9b60a86b8cfe13
+[transport-udp]
+type=transport
+protocol=udp
+bind=127.0.0.1:5061
+external_signaling_address=127.0.0.1:5061
+
+[bob-endpoint-template](!)
+type=endpoint
+aors=aor-bob
+fromuser=uut
+transport=transport-udp
+
+[bob1](bob-endpoint-template)
+outbound_auth=auth-bob1
+
+[bob2](bob-endpoint-template)
+outbound_auth=auth-bob2
+
+[bob3](bob-endpoint-template)
+outbound_auth=auth-bob3
+
+[bob4](bob-endpoint-template)
+outbound_auth=auth-bob4
+
+[aor-bob]
+type=aor
+contact=sip:bob at 127.0.0.1:5060
+
+[auth-bob1]
+; Explicit realm, userpass
+type=auth
+username=uut
+password=uut
+realm=example.org
+
+[auth-bob2]
+; No realm, userpass
+type=auth
+username=uut
+password=uut
+
+[auth-bob3]
+; explicit realm, md5
+type=auth
+auth_type=md5
+username=uut
+md5_cred=2f9299a02c0657d35d9b60a86b8cfe13
+realm=example.org
+
+[auth-bob4]
+; no realm, md5
+type=auth
+auth_type=md5
+username=uut
+md5_cred=2f9299a02c0657d35d9b60a86b8cfe13
Propchange: asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/configs/ast1/pjsip.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/configs/ast2/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/configs/ast2/extensions.conf?view=auto&rev=4183
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/configs/ast2/extensions.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/configs/ast2/extensions.conf Fri Sep 13 09:46:30 2013
@@ -1,0 +1,8 @@
+[default]
+exten => bob,1,Answer()
+same => n,UserEvent(CallResult, result: success)
+same => n,Hangup()
+[default]
+exten => bob,1,Answer()
+same => n,UserEvent(CallResult, result: success)
+same => n,Hangup()
Propchange: asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/configs/ast2/extensions.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/configs/ast2/extensions.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/configs/ast2/extensions.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/configs/ast2/pjsip.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/configs/ast2/pjsip.conf?view=auto&rev=4183
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/configs/ast2/pjsip.conf (added)
+++ asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/configs/ast2/pjsip.conf Fri Sep 13 09:46:30 2013
@@ -1,0 +1,32 @@
+[transport-udp]
+type=transport
+protocol=udp
+bind=127.0.0.1:5060
+external_signaling_address=127.0.0.1:5060
+
+[uut]
+type=endpoint
+context=default
+auth=auth-uut
+
+[auth-uut]
+type=auth
+username=uut
+password=uut
+realm=example.org
+[transport-udp]
+type=transport
+protocol=udp
+bind=127.0.0.1:5060
+external_signaling_address=127.0.0.1:5060
+
+[uut]
+type=endpoint
+context=default
+auth=auth-uut
+
+[auth-uut]
+type=auth
+username=uut
+password=uut
+realm=example.org
Propchange: asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/configs/ast2/pjsip.conf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/configs/ast2/pjsip.conf
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/configs/ast2/pjsip.conf
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/test-config.yaml?view=auto&rev=4183
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/test-config.yaml (added)
+++ asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/test-config.yaml Fri Sep 13 09:46:30 2013
@@ -1,0 +1,222 @@
+testinfo:
+ summary: 'Tests basic two party calls initiated and hung up by Alice'
+ description: |
+ 'Run two instances of Asterisk, "uut", and "bob" to test
+ outbound authentication. The uut will place calls to bob. Bob will
+ challenge all incoming calls. The uut should be able to properly
+ authenticate for each challenge. Bob will answer the calls and
+ playback a file. Both the uut and bob will emit userevents to indicate
+ whether the calls were successful.
+ This test only runs on a UDP transport over IPv4 because transport
+ and address family do not play into authentication ability. Coverage
+ for other transports and other address families is handled by more
+ basic tests.'
+
+test-modules:
+ test-object:
+ config-section: test-object-config
+ typename: 'TestCase.TestCaseModule'
+ modules:
+ -
+ config-section: 'originator-realm'
+ typename: 'PluggableModules.Originator'
+ -
+ config-section: 'originator-norealm'
+ typename: 'PluggableModules.Originator'
+ -
+ config-section: 'originator-realm-md5'
+ typename: 'PluggableModules.Originator'
+ -
+ config-section: 'originator-norealm-md5'
+ typename: 'PluggableModules.Originator'
+ -
+ config-section: 'ami-config'
+ typename: 'ami.AMIEventModule'
+
+test-object-config:
+ asterisk-instances: 2
+ connect-ami: True
+
+originator-realm:
+ trigger: 'ami_connect'
+ ignore-originate-failure: 'no'
+ id: '0'
+ channel: 'PJSIP/bob1'
+ context: 'default'
+ exten: 'success'
+ priority: '1'
+ async: 'True'
+
+originator-norealm:
+ trigger: 'ami_connect'
+ ignore-originate-failure: 'no'
+ id: '0'
+ channel: 'PJSIP/bob2'
+ context: 'default'
+ exten: 'success'
+ priority: '1'
+ async: 'True'
+
+originator-realm-md5:
+ trigger: 'ami_connect'
+ ignore-originate-failure: 'no'
+ id: '0'
+ channel: 'PJSIP/bob3'
+ context: 'default'
+ exten: 'success'
+ priority: '1'
+ async: 'True'
+
+originator-norealm-md5:
+ trigger: 'ami_connect'
+ ignore-originate-failure: 'no'
+ id: '0'
+ channel: 'PJSIP/bob4'
+ context: 'default'
+ exten: 'success'
+ priority: '1'
+ async: 'True'
+
+ami-config:
+ # UUT events
+ -
+ type: 'headermatch'
+ id: '0'
+ conditions:
+ match:
+ Event: 'UserEvent'
+ UserEvent: 'CallResult'
+ requirements:
+ match:
+ result: 'success'
+ count: '4'
+ # bob events
+ -
+ type: 'headermatch'
+ id: '1'
+ conditions:
+ match:
+ Event: 'UserEvent'
+ UserEvent: 'CallResult'
+ requirements:
+ match:
+ result: 'success'
+ count: '4'
+
+properties:
+ minversion: '12.0.0'
+ dependencies:
+ - asterisk : 'res_pjsip'
+ tags:
+ - pjsip
+testinfo:
+ summary: 'Tests basic two party calls initiated and hung up by Alice'
+ description: |
+ 'Run two instances of Asterisk, "uut", and "bob" to test
+ outbound authentication. The uut will place calls to bob. Bob will
+ challenge all incoming calls. The uut should be able to properly
+ authenticate for each challenge. Bob will answer the calls and
+ playback a file. Both the uut and bob will emit userevents to indicate
+ whether the calls were successful.
+ This test only runs on a UDP transport over IPv4 because transport
+ and address family do not play into authentication ability. Coverage
+ for other transports and other address families is handled by more
+ basic tests.'
+
+test-modules:
+ test-object:
+ config-section: test-object-config
+ typename: 'TestCase.TestCaseModule'
+ modules:
+ -
+ config-section: 'originator-realm'
+ typename: 'PluggableModules.Originator'
+ -
+ config-section: 'originator-norealm'
+ typename: 'PluggableModules.Originator'
+ -
+ config-section: 'originator-realm-md5'
+ typename: 'PluggableModules.Originator'
+ -
+ config-section: 'originator-norealm-md5'
+ typename: 'PluggableModules.Originator'
+ -
+ config-section: 'ami-config'
+ typename: 'ami.AMIEventModule'
+
+test-object-config:
+ asterisk-instances: 2
+ connect-ami: True
+
+originator-realm:
+ trigger: 'ami_connect'
+ ignore-originate-failure: 'no'
+ id: '0'
+ channel: 'PJSIP/bob1'
+ context: 'default'
+ exten: 'success'
+ priority: '1'
+ async: 'True'
+
+originator-norealm:
+ trigger: 'ami_connect'
+ ignore-originate-failure: 'no'
+ id: '0'
+ channel: 'PJSIP/bob2'
+ context: 'default'
+ exten: 'success'
+ priority: '1'
+ async: 'True'
+
+originator-realm-md5:
+ trigger: 'ami_connect'
+ ignore-originate-failure: 'no'
+ id: '0'
+ channel: 'PJSIP/bob3'
+ context: 'default'
+ exten: 'success'
+ priority: '1'
+ async: 'True'
+
+originator-norealm-md5:
+ trigger: 'ami_connect'
+ ignore-originate-failure: 'no'
+ id: '0'
+ channel: 'PJSIP/bob4'
+ context: 'default'
+ exten: 'success'
+ priority: '1'
+ async: 'True'
+
+ami-config:
+ # UUT events
+ -
+ type: 'headermatch'
+ id: '0'
+ conditions:
+ match:
+ Event: 'UserEvent'
+ UserEvent: 'CallResult'
+ requirements:
+ match:
+ result: 'success'
+ count: '4'
+ # bob events
+ -
+ type: 'headermatch'
+ id: '1'
+ conditions:
+ match:
+ Event: 'UserEvent'
+ UserEvent: 'CallResult'
+ requirements:
+ match:
+ result: 'success'
+ count: '4'
+
+properties:
+ minversion: '12.0.0'
+ dependencies:
+ - asterisk : 'res_pjsip'
+ tags:
+ - pjsip
Propchange: asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/test-config.yaml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/test-config.yaml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Propchange: asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/auth/test-config.yaml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/tests.yaml?view=diff&rev=4183&r1=4182&r2=4183
==============================================================================
--- asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/tests.yaml (original)
+++ asterisk/trunk/tests/channels/pjsip/basic_calls/outgoing/nominal/tests.yaml Fri Sep 13 09:46:30 2013
@@ -1,3 +1,4 @@
tests:
- test: 'playback'
- test: 'echo'
+ - test: 'auth'
More information about the asterisk-commits
mailing list