[svn-commits] qwell: branch qwell/CORS r3928 - in /asterisk/team/qwell/CORS/tests/rest_api/...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Jul 19 11:00:50 CDT 2013


Author: qwell
Date: Fri Jul 19 11:00:48 2013
New Revision: 3928

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=3928
Log:
Make tests run.  Python is silly.

Added:
    asterisk/team/qwell/CORS/tests/rest_api/CORS/configs/ast4/
      - copied from r3927, asterisk/team/qwell/CORS/tests/rest_api/CORS/configs/ast3/
Removed:
    asterisk/team/qwell/CORS/tests/rest_api/CORS/ari_multiple.conf
    asterisk/team/qwell/CORS/tests/rest_api/CORS/ari_star.conf
Modified:
    asterisk/team/qwell/CORS/tests/rest_api/CORS/configs/ast4/ari.conf
    asterisk/team/qwell/CORS/tests/rest_api/CORS/configs/ast4/http.conf
    asterisk/team/qwell/CORS/tests/rest_api/CORS/run-test

Modified: asterisk/team/qwell/CORS/tests/rest_api/CORS/configs/ast4/ari.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/qwell/CORS/tests/rest_api/CORS/configs/ast4/ari.conf?view=diff&rev=3928&r1=3927&r2=3928
==============================================================================
--- asterisk/team/qwell/CORS/tests/rest_api/CORS/configs/ast4/ari.conf (original)
+++ asterisk/team/qwell/CORS/tests/rest_api/CORS/configs/ast4/ari.conf Fri Jul 19 11:00:48 2013
@@ -1,6 +1,6 @@
 [general]
 enabled = yes
-allowed_origins = http://example.com,http://127.0.0.3
+allowed_origins = http://example.com
 
 [cors]
 type=user

Modified: asterisk/team/qwell/CORS/tests/rest_api/CORS/configs/ast4/http.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/qwell/CORS/tests/rest_api/CORS/configs/ast4/http.conf?view=diff&rev=3928&r1=3927&r2=3928
==============================================================================
--- asterisk/team/qwell/CORS/tests/rest_api/CORS/configs/ast4/http.conf (original)
+++ asterisk/team/qwell/CORS/tests/rest_api/CORS/configs/ast4/http.conf Fri Jul 19 11:00:48 2013
@@ -1,3 +1,3 @@
 [general]
 enabled=yes
-bindaddr=127.0.0.3
+bindaddr=127.0.0.4

Modified: asterisk/team/qwell/CORS/tests/rest_api/CORS/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/qwell/CORS/tests/rest_api/CORS/run-test?view=diff&rev=3928&r1=3927&r2=3928
==============================================================================
--- asterisk/team/qwell/CORS/tests/rest_api/CORS/run-test (original)
+++ asterisk/team/qwell/CORS/tests/rest_api/CORS/run-test Fri Jul 19 11:00:48 2013
@@ -39,9 +39,9 @@
     def run(self, test, ast_instance, expect_headers):
         LOGGER.debug("Running %s" % self)
         # api_key auth
-        resp = self.method("http://127.0.0.%d:%d/%s" % (self.ast_instance, PORT, build_url('ari', 'channels')),
+        resp = self.method("http://127.0.0.%d:%d/%s" % (ast_instance, PORT, build_url('ari', 'channels')),
                            params={'api_key': "%s:%s" % self.userpass},
-                           headers={'Origin': "http://127.0.0.%d" % self.ast_instance})
+                           headers={'Origin': "http://127.0.0.%d" % ast_instance})
 
         if self.expected_response != resp.status_code:
             LOGGER.error("Expected %d, got %d (%s). %s" % (
@@ -70,12 +70,14 @@
     def __init__(self):
         TestCase.__init__(self)
         self.passed = True
-        self.create_asterisk(3)
+        self.create_asterisk(4)
 
     def run(self):
+        TestCase.run(self)
         self.run_scenarios(1, False)
-        self.run_scenarios(2, False)
+        self.run_scenarios(2, True)
         self.run_scenarios(3, True)
+        self.run_scenarios(4, False)
 
         self.stop_reactor()
 
@@ -84,7 +86,7 @@
             if self.passed == False:
                 return
 
-            scenario.run(self, self.ast_instance, expect_headers)
+            scenario.run(self, ast_instance, expect_headers)
 
 def main():
     test = ARICORSTest()




More information about the svn-commits mailing list