summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAyumu Ueha <ueha.ayumu@fujitsu.com>2022-08-09 14:07:21 +0000
committerAyumu Ueha <ueha.ayumu@fujitsu.com>2022-08-09 14:33:32 +0000
commit9c49da6887eaff67d19fe0d12fb1046dde3bdaec (patch)
treed0f475521afd683955a2654785f7e2d150bf94ba
parent2bda844bb219df355d74b5c5b21f86244921a1c2 (diff)
downloadkeystonemiddleware-9c49da6887eaff67d19fe0d12fb1046dde3bdaec.tar.gz
Fix logging notifier unit test10.0.1
For unknown reasons, the `create_notifier()` in `test_api_request_no_messaging()` used `oslo_messaging.Notifier` instead of the `_LogNotifier` that should be originally used, causing unit test to fail. This patch fixes this issue by changing `use_oslo_messaging` config to False for this test. Change-Id: I32f9dc596525e912e37984764f68564e26ecfd3b
-rw-r--r--keystonemiddleware/tests/unit/audit/test_logging_notifier.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/keystonemiddleware/tests/unit/audit/test_logging_notifier.py b/keystonemiddleware/tests/unit/audit/test_logging_notifier.py
index f734061..fafd4c7 100644
--- a/keystonemiddleware/tests/unit/audit/test_logging_notifier.py
+++ b/keystonemiddleware/tests/unit/audit/test_logging_notifier.py
@@ -27,6 +27,8 @@ class TestLoggingNotifier(base.BaseAuditMiddlewareTest):
super(TestLoggingNotifier, self).setUp()
def test_api_request_no_messaging(self):
+ self.cfg.config(use_oslo_messaging=False,
+ group='audit_middleware_notifications')
app = self.create_simple_app()
with mock.patch('keystonemiddleware.audit._LOG.info') as log: