From 4efd89f7c27dff54ce2ae22a05d47cb4ddd4df5e Mon Sep 17 00:00:00 2001 From: Kenneth Giusti <kgiusti@gmail.com> Date: Tue, 6 Oct 2015 09:30:34 -0400 Subject: [PATCH] AMQP 1.0: Properly initialize AMQP 1.0 configuration options This patch adds AMQP 1.0 configuration options to the ConfFixture class. Change-Id: I01e7113358967939f22d6bc452b03e80101c9814 Closes-Bug: #1503299 --- oslo_messaging/conffixture.py | 3 +++ oslo_messaging/tests/test_amqp_driver.py | 7 ++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/oslo_messaging/conffixture.py b/oslo_messaging/conffixture.py index bbf92caf0..1312d66cf 100644 --- a/oslo_messaging/conffixture.py +++ b/oslo_messaging/conffixture.py @@ -56,6 +56,9 @@ class ConfFixture(fixtures.Fixture): _import_opts(self.conf, 'oslo_messaging._drivers.amqp', 'amqp_opts', 'oslo_messaging_qpid') + _import_opts(self.conf, + 'oslo_messaging._drivers.protocols.amqp.opts', + 'amqp1_opts', 'oslo_messaging_amqp') _import_opts(self.conf, 'oslo_messaging._drivers.impl_zmq', 'zmq_opts') _import_opts(self.conf, diff --git a/oslo_messaging/tests/test_amqp_driver.py b/oslo_messaging/tests/test_amqp_driver.py index d1ce0c9d8..4e3b750fe 100644 --- a/oslo_messaging/tests/test_amqp_driver.py +++ b/oslo_messaging/tests/test_amqp_driver.py @@ -395,6 +395,8 @@ mech_list: ${mechs} sasl_config_dir=self._conf_dir, sasl_config_name="openstack") self._broker.start() + self.messaging_conf.transport_driver = 'amqp' + self.conf = self.messaging_conf.conf def tearDown(self): super(TestCyrusAuthentication, self).tearDown() @@ -460,8 +462,6 @@ mech_list: ${mechs} wait_for_reply=True, timeout=2.0) driver.cleanup() - self.config(sasl_mechanisms=None, - group="oslo_messaging_amqp") def test_authentication_default_username(self): """Verify that a configured username/password is used if none appears @@ -481,9 +481,6 @@ mech_list: ${mechs} listener.join(timeout=30) self.assertFalse(listener.isAlive()) driver.cleanup() - self.config(username=None, - password=None, - group="oslo_messaging_amqp") @testtools.skipUnless(pyngus, "proton modules not present")