[svn-commits] mmichelson: branch mmichelson/bridge-tests r3409 - in /asterisk/team/mmichels...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Aug 6 16:34:35 CDT 2012


Author: mmichelson
Date: Mon Aug  6 16:34:31 2012
New Revision: 3409

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=3409
Log:
This addresses some review feedback.

The test tries to be a bit more protocol agnostic in a couple of ways.

First, instead of having "sip set debug" hardcoded in. We now turn on
SIP, IAX2, and XMPP debug.

iax.conf files have been added to the individual Asterisk servers.

The "extension" option has been changed to "originate_channel" so that
an entire dialstring can be specified. No more locking us into SIP.


Added:
    asterisk/team/mmichelson/bridge-tests/configs/bridge/ast1/iax.conf   (with props)
    asterisk/team/mmichelson/bridge-tests/configs/bridge/ast2/iax.conf   (with props)
    asterisk/team/mmichelson/bridge-tests/configs/bridge/ast3/iax.conf   (with props)
Modified:
    asterisk/team/mmichelson/bridge-tests/lib/python/asterisk/BridgeTestCase.py
    asterisk/team/mmichelson/bridge-tests/sample-yaml/bridge-config.yaml.sample
    asterisk/team/mmichelson/bridge-tests/tests/bridge/atxfer/test-config.yaml
    asterisk/team/mmichelson/bridge-tests/tests/bridge/disconnect/test-config.yaml
    asterisk/team/mmichelson/bridge-tests/tests/bridge/simple_bridge/test-config.yaml

Added: asterisk/team/mmichelson/bridge-tests/configs/bridge/ast1/iax.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/mmichelson/bridge-tests/configs/bridge/ast1/iax.conf?view=auto&rev=3409
==============================================================================
--- asterisk/team/mmichelson/bridge-tests/configs/bridge/ast1/iax.conf (added)
+++ asterisk/team/mmichelson/bridge-tests/configs/bridge/ast1/iax.conf Mon Aug  6 16:34:31 2012
@@ -1,0 +1,13 @@
+[general]
+bindaddr=127.0.0.1
+bindport=4569
+
+[alice]
+type=friend
+host=127.0.0.1
+port=4570
+
+[bob]
+type=friend
+host=127.0.0.1
+port=4571

Propchange: asterisk/team/mmichelson/bridge-tests/configs/bridge/ast1/iax.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/team/mmichelson/bridge-tests/configs/bridge/ast1/iax.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/team/mmichelson/bridge-tests/configs/bridge/ast1/iax.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/team/mmichelson/bridge-tests/configs/bridge/ast2/iax.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/mmichelson/bridge-tests/configs/bridge/ast2/iax.conf?view=auto&rev=3409
==============================================================================
--- asterisk/team/mmichelson/bridge-tests/configs/bridge/ast2/iax.conf (added)
+++ asterisk/team/mmichelson/bridge-tests/configs/bridge/ast2/iax.conf Mon Aug  6 16:34:31 2012
@@ -1,0 +1,8 @@
+[general]
+binaddr=127.0.0.1
+bindport=4570
+
+[uut]
+type=friend
+host=127.0.0.1
+port=4569

Propchange: asterisk/team/mmichelson/bridge-tests/configs/bridge/ast2/iax.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/team/mmichelson/bridge-tests/configs/bridge/ast2/iax.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/team/mmichelson/bridge-tests/configs/bridge/ast2/iax.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/team/mmichelson/bridge-tests/configs/bridge/ast3/iax.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/mmichelson/bridge-tests/configs/bridge/ast3/iax.conf?view=auto&rev=3409
==============================================================================
--- asterisk/team/mmichelson/bridge-tests/configs/bridge/ast3/iax.conf (added)
+++ asterisk/team/mmichelson/bridge-tests/configs/bridge/ast3/iax.conf Mon Aug  6 16:34:31 2012
@@ -1,0 +1,8 @@
+[general]
+bindaddr=127.0.0.1
+bindport=4571
+
+[uut]
+type=friend
+host=127.0.0.1
+port=4569

Propchange: asterisk/team/mmichelson/bridge-tests/configs/bridge/ast3/iax.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/team/mmichelson/bridge-tests/configs/bridge/ast3/iax.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/team/mmichelson/bridge-tests/configs/bridge/ast3/iax.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: asterisk/team/mmichelson/bridge-tests/lib/python/asterisk/BridgeTestCase.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/mmichelson/bridge-tests/lib/python/asterisk/BridgeTestCase.py?view=diff&rev=3409&r1=3408&r2=3409
==============================================================================
--- asterisk/team/mmichelson/bridge-tests/lib/python/asterisk/BridgeTestCase.py (original)
+++ asterisk/team/mmichelson/bridge-tests/lib/python/asterisk/BridgeTestCase.py Mon Aug  6 16:34:31 2012
@@ -53,8 +53,8 @@
         # Just a quick sanity check so we can die early if
         # the tests are badly misconfigured
         for test_run in test_config:
-            if not 'extension' in test_run:
-                LOGGER.error("No configured extension in test run")
+            if not 'originate_channel' in test_run:
+                LOGGER.error("No configured originate channel in test run")
                 raise Exception
 
             self.test_runs.append(test_run)
@@ -66,23 +66,23 @@
         self.create_ami_factory(3)
 
     def ami_connect(self, ami):
+        self.ast[ami.id].cli_exec("sip set debug on")
+        self.ast[ami.id].cli_exec("iax2 set debug on")
+        self.ast[ami.id].cli_exec("xmpp set debug on")
         if (ami.id == 0):
             self.ami_uut = ami
             self.ami_uut.registerEvent('Bridge', self.uut_bridge_callback)
             self.ami_uut.registerEvent('TestEvent', self.test_callback)
-            self.ast[ami.id].cli_exec("sip set debug on")
             LOGGER.info("UUT AMI connected")
         elif (ami.id == 1):
             self.ami_alice = ami
             self.ami_alice.registerEvent('UserEvent', self.user_callback)
             self.ami_alice.registerEvent('Hangup', self.hangup_callback)
-            self.ast[ami.id].cli_exec("sip set debug on")
             LOGGER.info("Alice AMI connected")
         elif (ami.id == 2):
             self.ami_bob = ami
             self.ami_bob.registerEvent('UserEvent', self.user_callback)
             self.ami_bob.registerEvent('Hangup', self.hangup_callback)
-            self.ast[ami.id].cli_exec("sip set debug on")
             LOGGER.info("Bob AMI connected")
         else:
             LOGGER.warning("Unexpected AMI ID %d recieved" % ami.id)
@@ -116,7 +116,7 @@
 
         # Step 1: Initiate a call from Alice to Bob
         LOGGER.info("Originating call")
-        self.ami_alice.originate(channel = 'SIP/%s at uut' % test_run['extension'],
+        self.ami_alice.originate(channel = test_run['originate_channel'],
                 exten = 'test_call',
                 context = 'default',
                 priority = '1',

Modified: asterisk/team/mmichelson/bridge-tests/sample-yaml/bridge-config.yaml.sample
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/mmichelson/bridge-tests/sample-yaml/bridge-config.yaml.sample?view=diff&rev=3409&r1=3408&r2=3409
==============================================================================
--- asterisk/team/mmichelson/bridge-tests/sample-yaml/bridge-config.yaml.sample (original)
+++ asterisk/team/mmichelson/bridge-tests/sample-yaml/bridge-config.yaml.sample Mon Aug  6 16:34:31 2012
@@ -32,9 +32,11 @@
 	# Each item in the bridge configuration indicates a call
 	# from Alice to Bob.
     -
-		# The extension in the UUT for Alice to call. All calls are
-		# directed to the "default" context
-        extension: 'alice_atxfer'
+		# The test operates by originating a call within Alice. This is the
+		# 'channel' argument for the origination. It is intended that this should
+		# be directed toward the UUT. If the call is not directed to the UUT, do
+		# not expect your test to succeed.
+        originate_channel: 'SIP/alice_atxfer at uut'
 
 		# Once the call has been established, what features should be
 		# executed? Each item in this list represents a feature to be

Modified: asterisk/team/mmichelson/bridge-tests/tests/bridge/atxfer/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/mmichelson/bridge-tests/tests/bridge/atxfer/test-config.yaml?view=diff&rev=3409&r1=3408&r2=3409
==============================================================================
--- asterisk/team/mmichelson/bridge-tests/tests/bridge/atxfer/test-config.yaml (original)
+++ asterisk/team/mmichelson/bridge-tests/tests/bridge/atxfer/test-config.yaml Mon Aug  6 16:34:31 2012
@@ -12,7 +12,7 @@
 
 bridge-config:
     -
-        extension: 'alice_atxfer'
+        originate_channel: 'SIP/alice_atxfer at uut'
         hangup: 'alice'
         features:
             -
@@ -24,7 +24,7 @@
                 what: 'atxfer'
                 success: 'true'
     -
-        extension: 'alice_atxfer2'
+        originate_channel: 'SIP/alice_atxfer2 at uut'
         hangup: 'alice'
         features:
             -
@@ -36,7 +36,7 @@
                 what: 'atxfer'
                 success: 'true'
     -
-        extension: 'bob_atxfer'
+        originate_channel: 'SIP/bob_atxfer at uut'
         hangup: 'alice'
         features:
             -

Modified: asterisk/team/mmichelson/bridge-tests/tests/bridge/disconnect/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/mmichelson/bridge-tests/tests/bridge/disconnect/test-config.yaml?view=diff&rev=3409&r1=3408&r2=3409
==============================================================================
--- asterisk/team/mmichelson/bridge-tests/tests/bridge/disconnect/test-config.yaml (original)
+++ asterisk/team/mmichelson/bridge-tests/tests/bridge/disconnect/test-config.yaml Mon Aug  6 16:34:31 2012
@@ -11,7 +11,7 @@
 
 bridge-config:
     -
-        extension: 'alice_disconnect'
+        originate_channel: 'SIP/alice_disconnect at uut'
         features:
             -
                 who: 'bob'
@@ -22,7 +22,7 @@
                 what: 'disconnect'
                 success: 'true'
     -
-        extension: 'alice_disconnect2'
+        originate_channel: 'SIP/alice_disconnect2 at uut'
         features:
             -
                 who: 'bob'
@@ -33,7 +33,7 @@
                 what: 'disconnect'
                 success: 'true'
     -
-        extension: 'bob_disconnect'
+        originate_channel: 'SIP/bob_disconnect at uut'
         features:
             -
                 who: 'alice'

Modified: asterisk/team/mmichelson/bridge-tests/tests/bridge/simple_bridge/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/mmichelson/bridge-tests/tests/bridge/simple_bridge/test-config.yaml?view=diff&rev=3409&r1=3408&r2=3409
==============================================================================
--- asterisk/team/mmichelson/bridge-tests/tests/bridge/simple_bridge/test-config.yaml (original)
+++ asterisk/team/mmichelson/bridge-tests/tests/bridge/simple_bridge/test-config.yaml Mon Aug  6 16:34:31 2012
@@ -11,10 +11,10 @@
 
 bridge-config:
     -
-        extension: 'test_call'
+        originate_channel: 'SIP/test_call at uut'
         hangup: 'alice'
     -
-        extension: 'test_call'
+        originate_channel: 'SIP/test_call at uut'
         hangup: 'bob'
 
 properties:




More information about the svn-commits mailing list