[asterisk-commits] pabelanger: branch pabelanger/testClass r1515 - in /asterisk/team/pabelanger/...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed May 18 14:35:43 CDT 2011


Author: pabelanger
Date: Wed May 18 14:35:38 2011
New Revision: 1515

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=1515
Log:
Update create_ami_factory() default parameters.
Add basic test to test M18882 regression

Added:
    asterisk/team/pabelanger/testClass/tests/regressions/
    asterisk/team/pabelanger/testClass/tests/regressions/M18882/
    asterisk/team/pabelanger/testClass/tests/regressions/M18882/configs/
    asterisk/team/pabelanger/testClass/tests/regressions/M18882/configs/ast1/
    asterisk/team/pabelanger/testClass/tests/regressions/M18882/configs/ast1/manager.general.conf.inc   (with props)
    asterisk/team/pabelanger/testClass/tests/regressions/M18882/run-test   (with props)
    asterisk/team/pabelanger/testClass/tests/regressions/M18882/test-config.yaml   (with props)
    asterisk/team/pabelanger/testClass/tests/regressions/tests.yaml   (with props)
Modified:
    asterisk/team/pabelanger/testClass/lib/python/asterisk/TestCase.py
    asterisk/team/pabelanger/testClass/tests/tests.yaml

Modified: asterisk/team/pabelanger/testClass/lib/python/asterisk/TestCase.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/testClass/lib/python/asterisk/TestCase.py?view=diff&rev=1515&r1=1514&r2=1515
==============================================================================
--- asterisk/team/pabelanger/testClass/lib/python/asterisk/TestCase.py (original)
+++ asterisk/team/pabelanger/testClass/lib/python/asterisk/TestCase.py Wed May 18 14:35:38 2011
@@ -64,7 +64,7 @@
             self.ast[c].install_configs("%s/configs/ast%d" %
                     (self.options.test_name, c + 1))
 
-    def create_ami_factory(self, count=1, username=None, secret=None, port=5038):
+    def create_ami_factory(self, count=1, username=user, secret=mysecret, port=5038):
         """
 
         Keywork arguments:

Added: asterisk/team/pabelanger/testClass/tests/regressions/M18882/configs/ast1/manager.general.conf.inc
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/testClass/tests/regressions/M18882/configs/ast1/manager.general.conf.inc?view=auto&rev=1515
==============================================================================
--- asterisk/team/pabelanger/testClass/tests/regressions/M18882/configs/ast1/manager.general.conf.inc (added)
+++ asterisk/team/pabelanger/testClass/tests/regressions/M18882/configs/ast1/manager.general.conf.inc Wed May 18 14:35:38 2011
@@ -1,0 +1,1 @@
+enabled = yes

Propchange: asterisk/team/pabelanger/testClass/tests/regressions/M18882/configs/ast1/manager.general.conf.inc
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/team/pabelanger/testClass/tests/regressions/M18882/configs/ast1/manager.general.conf.inc
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/team/pabelanger/testClass/tests/regressions/M18882/configs/ast1/manager.general.conf.inc
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/team/pabelanger/testClass/tests/regressions/M18882/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/testClass/tests/regressions/M18882/run-test?view=auto&rev=1515
==============================================================================
--- asterisk/team/pabelanger/testClass/tests/regressions/M18882/run-test (added)
+++ asterisk/team/pabelanger/testClass/tests/regressions/M18882/run-test Wed May 18 14:35:38 2011
@@ -1,0 +1,51 @@
+#!/usr/bin/env python
+'''
+Copyright (C) 2011, Digium, Inc.
+Paul Belanger <pabelanger at digium.com>
+
+This program is free software, distributed under the terms of
+the GNU General Public License Version 2.
+'''
+
+import sys
+from twisted.internet import reactor
+
+sys.path.append("lib/python")
+from asterisk.asterisk import Asterisk
+from asterisk.TestCase import TestCase
+
+class AsteriskTest(TestCase):
+    def __init__(self, argv):
+        TestCase.__init__(self, argv)
+        self.create_asterisk()
+
+    def ami_logoff(self, ami):
+        self.passed = True
+        self.stop_reactor()
+
+    def ami_connect(self, ami):
+        TestCase.ami_connect(self, ami)
+        self.ami[0].logoff().addCallbacks(self.ami_logoff, self.ami_login_error)
+
+    def run(self):
+        TestCase.run(self)
+        self.create_ami_factory()
+
+def main(argv=None):
+    if argv is None:
+        argv = sys.argv
+
+    test = AsteriskTest(argv)
+    test.start_asterisk()
+    reactor.run()
+    test.stop_asterisk()
+    if test.passed:
+        return 0
+    return 1
+
+
+if __name__ == "__main__":
+    sys.exit(main() or 0)
+
+
+# vim:sw=4:ts=4:expandtab:textwidth=79

Propchange: asterisk/team/pabelanger/testClass/tests/regressions/M18882/run-test
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/team/pabelanger/testClass/tests/regressions/M18882/run-test
------------------------------------------------------------------------------
    svn:executable = *

Propchange: asterisk/team/pabelanger/testClass/tests/regressions/M18882/run-test
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/team/pabelanger/testClass/tests/regressions/M18882/run-test
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/team/pabelanger/testClass/tests/regressions/M18882/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/testClass/tests/regressions/M18882/test-config.yaml?view=auto&rev=1515
==============================================================================
--- asterisk/team/pabelanger/testClass/tests/regressions/M18882/test-config.yaml (added)
+++ asterisk/team/pabelanger/testClass/tests/regressions/M18882/test-config.yaml Wed May 18 14:35:38 2011
@@ -1,0 +1,11 @@
+testinfo:
+    summary:     'Test loggin in to the Asterisk Manager Interface'
+    description: |
+        'This test provides a basic AMI sanity check.  It will log in,
+        and log out.'
+
+properties:
+    minversion: '1.4'
+    dependencies:
+        - python : 'twisted'
+        - python : 'starpy'

Propchange: asterisk/team/pabelanger/testClass/tests/regressions/M18882/test-config.yaml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/team/pabelanger/testClass/tests/regressions/M18882/test-config.yaml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/team/pabelanger/testClass/tests/regressions/M18882/test-config.yaml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: asterisk/team/pabelanger/testClass/tests/regressions/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/testClass/tests/regressions/tests.yaml?view=auto&rev=1515
==============================================================================
--- asterisk/team/pabelanger/testClass/tests/regressions/tests.yaml (added)
+++ asterisk/team/pabelanger/testClass/tests/regressions/tests.yaml Wed May 18 14:35:38 2011
@@ -1,0 +1,3 @@
+# Enter tests here in the order they should be considered for execution:
+tests:
+    - test: 'M18882'

Propchange: asterisk/team/pabelanger/testClass/tests/regressions/tests.yaml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/team/pabelanger/testClass/tests/regressions/tests.yaml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/team/pabelanger/testClass/tests/regressions/tests.yaml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: asterisk/team/pabelanger/testClass/tests/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/testClass/tests/tests.yaml?view=diff&rev=1515&r1=1514&r2=1515
==============================================================================
--- asterisk/team/pabelanger/testClass/tests/tests.yaml (original)
+++ asterisk/team/pabelanger/testClass/tests/tests.yaml Wed May 18 14:35:38 2011
@@ -32,3 +32,4 @@
     - dir: 'agi'
     - dir: 'pbx'
     - dir: 'fax'
+    - dir: 'regressions'




More information about the asterisk-commits mailing list