OpenStackCharm class reset adapters_class to None
The base OpenStackCharm class sets the adapters_class, but unfortunately in the same function, it then sets it to None. Although this was the default behaviour, it was changed so that there was a default adapters_class. Unfortunately, this was missed. This patchset fixes that. Change-Id: If4e2b1abe33106657f0638179c86c0d619240e98
This commit is contained in:
parent
84d3e784a3
commit
509bfdab2e
|
@ -544,7 +544,6 @@ class OpenStackCharm(object):
|
|||
configuration_class = os_adapters.ConfigurationAdapter
|
||||
|
||||
ha_resources = []
|
||||
adapters_class = None
|
||||
HAPROXY_CONF = '/etc/haproxy/haproxy.cfg'
|
||||
MEMCACHE_CONF = '/etc/memcached.conf'
|
||||
package_codenames = {}
|
||||
|
|
|
@ -454,7 +454,9 @@ class TestOpenStackCharm__init__(BaseOpenStackCharmTest):
|
|||
def test_empty_init_args(self):
|
||||
target = chm.OpenStackCharm()
|
||||
self.assertIsNone(target.release)
|
||||
self.assertIsNone(target.adapters_instance)
|
||||
# we expect target.adapters_instance to not be None as
|
||||
# target.adapters_class is not None as a default
|
||||
self.assertIsNotNone(target.adapters_instance)
|
||||
# from mocked hookenv.config()
|
||||
self.assertEqual(target.config, TEST_CONFIG)
|
||||
|
||||
|
|
Loading…
Reference in New Issue