[svn-commits] jrose: testsuite/asterisk/trunk r3353 - in /asterisk/trunk/tests: channels/SI...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Jul 23 15:05:02 CDT 2012


Author: jrose
Date: Mon Jul 23 15:04:48 2012
New Revision: 3353

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=3353
Log:
Named ACLs: Add a test to confirm the behavior of ACLs for usage by chan_iax2

Also includes some very minor code style improvements to manager and chan_sip
tests for ACLs/named ACLs.

Review: https://reviewboard.asterisk.org/r/2046/

Added:
    asterisk/trunk/tests/iax2/acl_call/
    asterisk/trunk/tests/iax2/acl_call/configs/
    asterisk/trunk/tests/iax2/acl_call/configs/ast1/
    asterisk/trunk/tests/iax2/acl_call/configs/ast1/acl.conf   (with props)
    asterisk/trunk/tests/iax2/acl_call/configs/ast1/extconfig.conf   (with props)
    asterisk/trunk/tests/iax2/acl_call/configs/ast1/extensions.conf   (with props)
    asterisk/trunk/tests/iax2/acl_call/configs/ast1/iax.conf   (with props)
    asterisk/trunk/tests/iax2/acl_call/configs/ast1/modules.conf   (with props)
    asterisk/trunk/tests/iax2/acl_call/configs/ast1/res_config_sqlite3.conf   (with props)
    asterisk/trunk/tests/iax2/acl_call/realtime.sqlite3   (with props)
    asterisk/trunk/tests/iax2/acl_call/run-test   (with props)
    asterisk/trunk/tests/iax2/acl_call/test-config.yaml   (with props)
Modified:
    asterisk/trunk/tests/channels/SIP/acl_call/run-test
    asterisk/trunk/tests/iax2/tests.yaml
    asterisk/trunk/tests/manager/acl-login/run-test

Modified: asterisk/trunk/tests/channels/SIP/acl_call/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/channels/SIP/acl_call/run-test?view=diff&rev=3353&r1=3352&r2=3353
==============================================================================
--- asterisk/trunk/tests/channels/SIP/acl_call/run-test (original)
+++ asterisk/trunk/tests/channels/SIP/acl_call/run-test Mon Jul 23 15:04:48 2012
@@ -11,7 +11,7 @@
 
 from asterisk.TestCase import TestCase
 
-logger = logging.getLogger(__name__)
+LOGGER = logging.getLogger(__name__)
 
 class SIPACLTest(TestCase):
 
@@ -65,7 +65,7 @@
         self.test_start(ami)
 
     def test_start(self, ami):
-        logger.info("Starting test %d - %s:" % (self.test_index, self.test_components[self.test_index][0]))
+        LOGGER.info("Starting test %d - %s:" % (self.test_index, self.test_components[self.test_index][0]))
 
         # The following variable tracks events that occur as a result of the following originate. We expect two events in all cases.
         # In the case of a successful call, we expect two hangups. If the call is unsuccessful, we expect a hangup and an AMI command error.
@@ -105,12 +105,12 @@
 
     def evaluate_call(self):
         if self.test_components[self.test_index][1] == "allow" and self.success_conditions == 2:
-            logger.info("Test %d - %s: Call Succeeded as Expected." % (self.test_index, self.test_components[self.test_index][0]))
+            LOGGER.info("Test %d - %s: Call Succeeded as Expected." % (self.test_index, self.test_components[self.test_index][0]))
         elif self.test_components[self.test_index][1] == "deny" and self.failure_conditions == 2:
-            logger.info("Test %d - %s: Call Failed as Expected." % (self.test_index, self.test_components[self.test_index][0]))
+            LOGGER.info("Test %d - %s: Call Failed as Expected." % (self.test_index, self.test_components[self.test_index][0]))
         else:
-            logger.error("Test %d - %s: Events received don't follow expectations. Test Failed." % (self.test_index, self.test_components[self.test_index][0]))
-            logger.error("Failure Triggering Events Received: %s" % self.events)
+            LOGGER.error("Test %d - %s: Events received don't follow expectations. Test Failed." % (self.test_index, self.test_components[self.test_index][0]))
+            LOGGER.error("Failure Triggering Events Received: %s" % self.events)
             self.passed = False
             self.stop_reactor()
             return
@@ -120,7 +120,7 @@
         if self.test_index < len(self.test_components):
             self.test_start(self.last_active_ami)
         else:
-            logger.info("All tests evaluated as expected. Test Successful.")
+            LOGGER.info("All tests evaluated as expected. Test Successful.")
             self.passed = True
             self.stop_reactor()
             return

Added: asterisk/trunk/tests/iax2/acl_call/configs/ast1/acl.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/iax2/acl_call/configs/ast1/acl.conf?view=auto&rev=3353
==============================================================================
--- asterisk/trunk/tests/iax2/acl_call/configs/ast1/acl.conf (added)
+++ asterisk/trunk/tests/iax2/acl_call/configs/ast1/acl.conf Mon Jul 23 15:04:48 2012
@@ -1,0 +1,15 @@
+[testacl1] ; Allow 127.0.0.1 only
+deny = 0.0.0.0/0.0.0.0
+permit = 127.0.0.1
+
+[testacl2] ; Disallow 127.0.0.1 only
+permit = 0.0.0.0/0.0.0.0
+deny = 127.0.0.1
+
+[testacl3] ; Disallow 127.0.0.3 only
+permit = 0.0.0.0/0.0.0.0
+deny = 127.0.0.3
+
+[testacl4] ; Disallow 127.0.0.4 only
+permit = 0.0.0.0/0.0.0.0
+deny = 127.0.0.4

Propchange: asterisk/trunk/tests/iax2/acl_call/configs/ast1/acl.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/iax2/acl_call/configs/ast1/acl.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/iax2/acl_call/configs/ast1/acl.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plan

Added: asterisk/trunk/tests/iax2/acl_call/configs/ast1/extconfig.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/iax2/acl_call/configs/ast1/extconfig.conf?view=auto&rev=3353
==============================================================================
--- asterisk/trunk/tests/iax2/acl_call/configs/ast1/extconfig.conf (added)
+++ asterisk/trunk/tests/iax2/acl_call/configs/ast1/extconfig.conf Mon Jul 23 15:04:48 2012
@@ -1,0 +1,2 @@
+[settings]
+acls => sqlite3,asterisk,acltable

Propchange: asterisk/trunk/tests/iax2/acl_call/configs/ast1/extconfig.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/iax2/acl_call/configs/ast1/extconfig.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/iax2/acl_call/configs/ast1/extconfig.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plan

Added: asterisk/trunk/tests/iax2/acl_call/configs/ast1/extensions.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/iax2/acl_call/configs/ast1/extensions.conf?view=auto&rev=3353
==============================================================================
--- asterisk/trunk/tests/iax2/acl_call/configs/ast1/extensions.conf (added)
+++ asterisk/trunk/tests/iax2/acl_call/configs/ast1/extensions.conf Mon Jul 23 15:04:48 2012
@@ -1,0 +1,4 @@
+[test_context]
+exten => s,1,Answer()
+exten => s,n,Playtones(400,100) ; Play a tone for one tenth of a second, just to have the call last some amount of time.
+exten => s,n,Hangup()

Propchange: asterisk/trunk/tests/iax2/acl_call/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/iax2/acl_call/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/iax2/acl_call/configs/ast1/extensions.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plan

Added: asterisk/trunk/tests/iax2/acl_call/configs/ast1/iax.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/iax2/acl_call/configs/ast1/iax.conf?view=auto&rev=3353
==============================================================================
--- asterisk/trunk/tests/iax2/acl_call/configs/ast1/iax.conf (added)
+++ asterisk/trunk/tests/iax2/acl_call/configs/ast1/iax.conf Mon Jul 23 15:04:48 2012
@@ -1,0 +1,29 @@
+[general]
+bindaddr=0.0.0.0
+context=test_context
+
+[testiax1] ; Allow calls only from the locally defined ACL (denies all except 127.0.0.1)
+type=friend
+context=test_context
+deny=0.0.0.0/0.0.0.0
+permit=127.0.0.1
+
+[testiax2] ; Same as testiax1, only defined via named ACL subsystem
+type=friend
+context=test_context
+acl=testacl1
+
+[testiax3] ; Multiple ACLs defined via named ACL subsystem. Collectively only 127.0.0.2 is acceptable
+type=friend
+context=test_context
+acl=testacl2,testacl3,testacl4
+
+[testiax4] ; An invalid ACL (not contained in the configuration or in realtime). No allowable addresses
+type=friend
+context=test_context
+acl=undefinedacl
+
+[testiax5] ; 3 ACLs stored on the realtime backend. Collectively only 127.0.0.3 is acceptable
+type=friend
+context=test_context
+acl=rtacl1,rtacl2,rtacl3

Propchange: asterisk/trunk/tests/iax2/acl_call/configs/ast1/iax.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/iax2/acl_call/configs/ast1/iax.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/iax2/acl_call/configs/ast1/iax.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plan

Added: asterisk/trunk/tests/iax2/acl_call/configs/ast1/modules.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/iax2/acl_call/configs/ast1/modules.conf?view=auto&rev=3353
==============================================================================
--- asterisk/trunk/tests/iax2/acl_call/configs/ast1/modules.conf (added)
+++ asterisk/trunk/tests/iax2/acl_call/configs/ast1/modules.conf Mon Jul 23 15:04:48 2012
@@ -1,0 +1,3 @@
+[modules]
+autoload=yes
+preload => res_config_sqlite3.so

Propchange: asterisk/trunk/tests/iax2/acl_call/configs/ast1/modules.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/iax2/acl_call/configs/ast1/modules.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/iax2/acl_call/configs/ast1/modules.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plan

Added: asterisk/trunk/tests/iax2/acl_call/configs/ast1/res_config_sqlite3.conf
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/iax2/acl_call/configs/ast1/res_config_sqlite3.conf?view=auto&rev=3353
==============================================================================
--- asterisk/trunk/tests/iax2/acl_call/configs/ast1/res_config_sqlite3.conf (added)
+++ asterisk/trunk/tests/iax2/acl_call/configs/ast1/res_config_sqlite3.conf Mon Jul 23 15:04:48 2012
@@ -1,0 +1,2 @@
+[asterisk]
+dbfile => /tmp/realtime.sqlite3

Propchange: asterisk/trunk/tests/iax2/acl_call/configs/ast1/res_config_sqlite3.conf
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/iax2/acl_call/configs/ast1/res_config_sqlite3.conf
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/iax2/acl_call/configs/ast1/res_config_sqlite3.conf
------------------------------------------------------------------------------
    svn:mime-type = text/plan

Added: asterisk/trunk/tests/iax2/acl_call/realtime.sqlite3
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/iax2/acl_call/realtime.sqlite3?view=auto&rev=3353
==============================================================================
Binary file - no diff available.

Propchange: asterisk/trunk/tests/iax2/acl_call/realtime.sqlite3
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: asterisk/trunk/tests/iax2/acl_call/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/iax2/acl_call/run-test?view=auto&rev=3353
==============================================================================
--- asterisk/trunk/tests/iax2/acl_call/run-test (added)
+++ asterisk/trunk/tests/iax2/acl_call/run-test Mon Jul 23 15:04:48 2012
@@ -1,0 +1,152 @@
+#!/usr/bin/env python
+
+import sys
+import logging
+import logging.config
+import os
+import shutil
+from twisted.internet import reactor
+
+sys.path.append("lib/python")
+
+from asterisk.TestCase import TestCase
+
+LOGGER = logging.getLogger(__name__)
+
+class IAX2ACLTest(TestCase):
+
+    # Preps test objects and configuration additions as well as copies TLS keys to test folder.
+    def __init__(self):
+        TestCase.__init__(self)
+        self.test_components = []
+
+        #success evaluation stuff
+        self.test_index = 0
+
+        #test1 - No named ACL, calling available only to 127.0.0.1
+        self.add_test_component("testiax1 at 127.0.0.1", "allow")
+        self.add_test_component("testiax1 at 127.0.0.2", "deny")
+        self.add_test_component("testiax1 at 127.0.0.3", "deny")
+        self.add_test_component("testiax1 at 127.0.0.4", "deny")
+
+        #test2 - Same permissible addresses as test 1, but while using a named ACL from the local configuration
+        self.add_test_component("testiax2 at 127.0.0.1", "allow")
+        self.add_test_component("testiax2 at 127.0.0.2", "deny")
+        self.add_test_component("testiax2 at 127.0.0.3", "deny")
+        self.add_test_component("testiax2 at 127.0.0.4", "deny")
+
+        #test3 - Multiple named ACL rules from local configuration. Only 127.0.0.2 should be allowed to call.
+        self.add_test_component("testiax3 at 127.0.0.1", "deny")
+        self.add_test_component("testiax3 at 127.0.0.2", "allow")
+        self.add_test_component("testiax3 at 127.0.0.3", "deny")
+        self.add_test_component("testiax3 at 127.0.0.4", "deny")
+
+        #test4 - An undefined rule is used. All addresses should be rejected from calling.
+        self.add_test_component("testiax4 at 127.0.0.1", "deny")
+        self.add_test_component("testiax4 at 127.0.0.2", "deny")
+        self.add_test_component("testiax4 at 127.0.0.3", "deny")
+        self.add_test_component("testiax4 at 127.0.0.4", "deny")
+
+        #test5 - A set of 3 named ACLs stored in realtime is used. Collectively only 127.0.0.3 should be allowed to call.
+        self.add_test_component("testiax5 at 127.0.0.1", "deny")
+        self.add_test_component("testiax5 at 127.0.0.2", "deny")
+        self.add_test_component("testiax5 at 127.0.0.3", "allow")
+        self.add_test_component("testiax5 at 127.0.0.4", "deny")
+
+        self.create_asterisk()
+
+    def add_test_component(self, test, expectation):
+        this_tuple = test, expectation
+        self.test_components.append(this_tuple)
+
+    # Once the AMI Factory connects to the AMI, this function fires.
+    def ami_connect(self, ami):
+        ami.registerEvent('Hangup', self.evaluate_hangup)
+        self.test_start(ami)
+
+    def test_start(self, ami):
+        LOGGER.info("Starting test %d - %s:" % (self.test_index, self.test_components[self.test_index][0]))
+
+        # The following variable tracks events that occur as a result of the following originate. We expect two events in all cases.
+        # In the case of a successful call, we expect two hangups. If the call is unsuccessful, we expect a hangup and an AMI command error.
+        self.events_received = 0
+        self.success_conditions = 0
+        self.failure_conditions = 0
+
+        # Storage for the events (failures and AMI hangups) that came in -- stored in case of something going wrong.
+        self.events = []
+
+        # There are callbacks that would lose the AMI, so we need to hold onto it within the test object.
+        self.last_active_ami = ami
+
+        ami.originate(channel = "IAX2/%s/s" % self.test_components[self.test_index][0], application = "Echo").addErrback(self.evaluate_originate_error)
+
+    def evaluate_hangup(self, ami, event):
+        self.events_received += 1
+        self.events.append(event)
+
+        # evaluate if whether the hangup indicates success or failure
+        reason = event.get('cause-txt')
+        if reason == "Normal Clearing":
+            self.success_conditions += 1
+        elif reason == "Unknown":
+            self.failure_conditions += 1
+
+        # If we've got two events of any kind, the call is finished and we can move on to the evaluation
+        if self.events_received == 2:
+            self.evaluate_call()
+
+    def evaluate_originate_error(self, reason):
+        self.events.append(reason)
+        self.events_received += 1
+        self.failure_conditions += 1
+        if self.events_received == 2:
+            self.evaluate_call()
+
+    def evaluate_call(self):
+        if self.test_components[self.test_index][1] == "allow" and self.success_conditions == 2:
+            LOGGER.info("Test %d - %s: Call Succeeded as Expected." % (self.test_index, self.test_components[self.test_index][0]))
+        elif self.test_components[self.test_index][1] == "deny" and self.failure_conditions == 2:
+            LOGGER.info("Test %d - %s: Call Failed as Expected." % (self.test_index, self.test_components[self.test_index][0]))
+        else:
+            LOGGER.error("Test %d - %s: Events received don't follow expectations. Test Failed." % (self.test_index, self.test_components[self.test_index][0]))
+            LOGGER.error("Failure Triggering Events Received: %s" % self.events)
+            self.passed = False
+            self.stop_reactor()
+            return
+
+        # Go on to the next test.
+        self.test_index += 1
+        if self.test_index < len(self.test_components):
+            self.test_start(self.last_active_ami)
+        else:
+            LOGGER.info("All tests evaluated as expected. Test Successful.")
+            self.passed = True
+            self.stop_reactor()
+            return
+
+    # Sets up reactor and AMI connection
+    def run(self):
+        TestCase.run(self)
+        self.create_ami_factory()
+
+
+def main():
+    TEST_DIR = os.path.dirname(os.path.realpath(__file__))
+    DB_PATH = TEST_DIR + "/realtime.sqlite3"
+    TMP_DB_PATH = "/tmp/realtime.sqlite3"
+    shutil.copyfile(DB_PATH, TMP_DB_PATH)
+    test = IAX2ACLTest()
+    reactor.run()
+    os.remove(TMP_DB_PATH)
+
+    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/trunk/tests/iax2/acl_call/run-test
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/iax2/acl_call/run-test
------------------------------------------------------------------------------
    svn:executable = *

Propchange: asterisk/trunk/tests/iax2/acl_call/run-test
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/iax2/acl_call/run-test
------------------------------------------------------------------------------
    svn:mime-type = text/plan

Added: asterisk/trunk/tests/iax2/acl_call/test-config.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/iax2/acl_call/test-config.yaml?view=auto&rev=3353
==============================================================================
--- asterisk/trunk/tests/iax2/acl_call/test-config.yaml (added)
+++ asterisk/trunk/tests/iax2/acl_call/test-config.yaml Mon Jul 23 15:04:48 2012
@@ -1,0 +1,16 @@
+testinfo:
+    summary: 'Test chan_iax2 usage of ACLs'
+    description: |
+        This tests IAX2 calls originating from different addresses against
+        IAX2 peers with varying means of specifying Access Control Lists.
+        This test is used to verify proper behavior of ACL and Named ACL
+        usage by the chan_iax2 driver.
+
+properties:
+    minversion: '11.0'
+    dependencies:
+        - python : 'twisted'
+        - python : 'starpy'
+    tags:
+        - IAX2
+        - ACL

Propchange: asterisk/trunk/tests/iax2/acl_call/test-config.yaml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: asterisk/trunk/tests/iax2/acl_call/test-config.yaml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: asterisk/trunk/tests/iax2/acl_call/test-config.yaml
------------------------------------------------------------------------------
    svn:mime-type = text/plan

Modified: asterisk/trunk/tests/iax2/tests.yaml
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/iax2/tests.yaml?view=diff&rev=3353&r1=3352&r2=3353
==============================================================================
--- asterisk/trunk/tests/iax2/tests.yaml (original)
+++ asterisk/trunk/tests/iax2/tests.yaml Mon Jul 23 15:04:48 2012
@@ -2,3 +2,4 @@
 tests:
     - test: 'basic-call'
     - test: 'hangupcause'
+    - test: 'acl_call'

Modified: asterisk/trunk/tests/manager/acl-login/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/manager/acl-login/run-test?view=diff&rev=3353&r1=3352&r2=3353
==============================================================================
--- asterisk/trunk/tests/manager/acl-login/run-test (original)
+++ asterisk/trunk/tests/manager/acl-login/run-test Mon Jul 23 15:04:48 2012
@@ -16,7 +16,7 @@
 from asterisk.TestCase import TestCase
 from starpy import manager
 
-logger = logging.getLogger(__name__)
+LOGGER = logging.getLogger(__name__)
 
 """
 This test case attempts to log in to AMI with various users from different addresses that are either accepted or rejected
@@ -81,7 +81,7 @@
     # Callback for a successful AMI Connection. This evaluates whether the connection should have been successful or not.
     def ami_connect(self, ami):
         success_expected = False
-        logger.info("AMI %d: login authenticated" % ami.id)
+        LOGGER.info("AMI %d: login authenticated" % ami.id)
 
         for item in self.successes_expected:
             if item == ami.id:
@@ -89,11 +89,11 @@
                 break
 
         if not success_expected:
-            logger.error("AMI %d: Login was allowed and it shouldn't have been." % ami.id)
+            LOGGER.error("AMI %d: Login was allowed and it shouldn't have been." % ami.id)
             self.got_bad_event = True
         else:
             #We no longer expect this entry since we already got it
-            logger.info("AMI %d: Login successful and expected." % ami.id)
+            LOGGER.info("AMI %d: Login successful and expected." % ami.id)
             self.successes_expected.remove(ami.id)
 
         self.components_received += 1
@@ -134,7 +134,7 @@
     # Receives data about test components and attempts to login to AMI using that data
     def ami_factory_test_function(self, entry=0, username="user", secret="mysecret", port = 5038, address = "127.0.0.1"):
         self.ami.append(None)
-        logger.info("Creating AMI %d - %s / %s" % (entry, username, address))
+        LOGGER.info("Creating AMI %d - %s / %s" % (entry, username, address))
         self.ami_factory = manager.AMIFactory(username, secret, entry)
         self.ami_factory.login(address).addCallbacks(self.ami_connect, self.ami_login_error)
 
@@ -142,15 +142,15 @@
     def evaluate_success(self):
         self.passed = True
         if self.components_received != self.components_expected:
-            logger.error("Did not receive expected number of login events. Received %d/%d." % (self.components_received % self.components_expected))
+            LOGGER.error("Did not receive expected number of login events. Received %d/%d." % (self.components_received % self.components_expected))
             self.passed = False
 
         if len(self.successes_expected) != 0:
-            logger.error("Not all logins that were expected to be allowed were completed. Missed: %s" % self.successes_expected)
+            LOGGER.error("Not all logins that were expected to be allowed were completed. Missed: %s" % self.successes_expected)
             self.passed = False
 
         if self.got_bad_event:
-            logger.error("An AMI login was allowed which was not expected.")
+            LOGGER.error("An AMI login was allowed which was not expected.")
             self.passed = False
 
 




More information about the svn-commits mailing list