Clean deprecated "rpc_backend" in tests

The "rpc_backend" config option has been deprecated for removal, see[1],
it is better to clean the "rpc_backend" in tests.

[1] https://review.openstack.org/#/c/317958/5

Change-Id: I756fe13d5f392587ee0de75f5bf2e2d08ce567d5
This commit is contained in:
liusheng 2016-06-12 11:41:23 +08:00
parent 77238e3367
commit d296996e6e
2 changed files with 4 additions and 10 deletions

View File

@ -26,9 +26,7 @@ from aodh.tests import base
class BinTestCase(base.BaseTestCase):
def setUp(self):
super(BinTestCase, self).setUp()
content = ("[DEFAULT]\n"
"rpc_backend=fake\n"
"[database]\n"
content = ("[database]\n"
"connection=log://localhost\n")
if six.PY3:
content = content.encode('utf-8')
@ -56,9 +54,7 @@ class BinTestCase(base.BaseTestCase):
b"time to live is disabled", err)
def test_run_expirer_ttl_enabled(self):
content = ("[DEFAULT]\n"
"rpc_backend=fake\n"
"[database]\n"
content = ("[database]\n"
"alarm_history_time_to_live=1\n"
"connection=log://localhost\n")
if six.PY3:
@ -81,9 +77,7 @@ class BinTestCase(base.BaseTestCase):
class BinEvaluatorTestCase(base.BaseTestCase):
def setUp(self):
super(BinEvaluatorTestCase, self).setUp()
content = ("[DEFAULT]\n"
"rpc_backend=fake\n"
"[database]\n"
content = ("[database]\n"
"connection=log://localhost\n")
if six.PY3:
content = content.encode('utf-8')

View File

@ -60,6 +60,6 @@ class MessagingTests(base.BaseTestCase):
self.assertNotEqual(t1, t2)
def test_get_transport_optional(self):
self.CONF.set_override('rpc_backend', '')
self.CONF.set_override('transport_url', 'non-url')
self.assertIsNone(messaging.get_transport(self.CONF, optional=True,
cache=False))