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: Ifb2ded8fcddd7206686ff56fdfcb2e6bf3c5484d
This commit is contained in:
parent
726f24334d
commit
c2b48d673e
@ -24,9 +24,7 @@ from ceilometer.tests import base
|
|||||||
class BinTestCase(base.BaseTestCase):
|
class BinTestCase(base.BaseTestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(BinTestCase, self).setUp()
|
super(BinTestCase, self).setUp()
|
||||||
content = ("[DEFAULT]\n"
|
content = ("[database]\n"
|
||||||
"rpc_backend=fake\n"
|
|
||||||
"[database]\n"
|
|
||||||
"connection=log://localhost\n")
|
"connection=log://localhost\n")
|
||||||
if six.PY3:
|
if six.PY3:
|
||||||
content = content.encode('utf-8')
|
content = content.encode('utf-8')
|
||||||
@ -56,9 +54,7 @@ class BinTestCase(base.BaseTestCase):
|
|||||||
b"time to live is disabled", err)
|
b"time to live is disabled", err)
|
||||||
|
|
||||||
def _test_run_expirer_ttl_enabled(self, ttl_name, data_name):
|
def _test_run_expirer_ttl_enabled(self, ttl_name, data_name):
|
||||||
content = ("[DEFAULT]\n"
|
content = ("[database]\n"
|
||||||
"rpc_backend=fake\n"
|
|
||||||
"[database]\n"
|
|
||||||
"%s=1\n"
|
"%s=1\n"
|
||||||
"connection=log://localhost\n" % ttl_name)
|
"connection=log://localhost\n" % ttl_name)
|
||||||
if six.PY3:
|
if six.PY3:
|
||||||
@ -89,7 +85,6 @@ class BinSendSampleTestCase(base.BaseTestCase):
|
|||||||
super(BinSendSampleTestCase, self).setUp()
|
super(BinSendSampleTestCase, self).setUp()
|
||||||
pipeline_cfg_file = self.path_get('etc/ceilometer/pipeline.yaml')
|
pipeline_cfg_file = self.path_get('etc/ceilometer/pipeline.yaml')
|
||||||
content = ("[DEFAULT]\n"
|
content = ("[DEFAULT]\n"
|
||||||
"rpc_backend=fake\n"
|
|
||||||
"pipeline_cfg_file={0}\n".format(pipeline_cfg_file))
|
"pipeline_cfg_file={0}\n".format(pipeline_cfg_file))
|
||||||
if six.PY3:
|
if six.PY3:
|
||||||
content = content.encode('utf-8')
|
content = content.encode('utf-8')
|
||||||
@ -126,9 +121,7 @@ class BinCeilometerPollingServiceTestCase(base.BaseTestCase):
|
|||||||
super(BinCeilometerPollingServiceTestCase, self).tearDown()
|
super(BinCeilometerPollingServiceTestCase, self).tearDown()
|
||||||
|
|
||||||
def test_starting_with_duplication_namespaces(self):
|
def test_starting_with_duplication_namespaces(self):
|
||||||
content = ("[DEFAULT]\n"
|
content = ("[database]\n"
|
||||||
"rpc_backend=fake\n"
|
|
||||||
"[database]\n"
|
|
||||||
"connection=log://localhost\n")
|
"connection=log://localhost\n")
|
||||||
if six.PY3:
|
if six.PY3:
|
||||||
content = content.encode('utf-8')
|
content = content.encode('utf-8')
|
||||||
@ -147,7 +140,6 @@ class BinCeilometerPollingServiceTestCase(base.BaseTestCase):
|
|||||||
|
|
||||||
def test_polling_namespaces_invalid_value_in_config(self):
|
def test_polling_namespaces_invalid_value_in_config(self):
|
||||||
content = ("[DEFAULT]\n"
|
content = ("[DEFAULT]\n"
|
||||||
"rpc_backend=fake\n"
|
|
||||||
"polling_namespaces = ['central']\n"
|
"polling_namespaces = ['central']\n"
|
||||||
"[database]\n"
|
"[database]\n"
|
||||||
"connection=log://localhost\n")
|
"connection=log://localhost\n")
|
||||||
|
@ -60,6 +60,6 @@ class MessagingTests(base.BaseTestCase):
|
|||||||
self.assertNotEqual(t1, t2)
|
self.assertNotEqual(t1, t2)
|
||||||
|
|
||||||
def test_get_transport_optional(self):
|
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(optional=True,
|
self.assertIsNone(messaging.get_transport(optional=True,
|
||||||
cache=False))
|
cache=False))
|
||||||
|
Loading…
Reference in New Issue
Block a user