Fixup test for switch to alternatives for ceph.conf

This commit is contained in:
James Page 2013-10-10 12:43:41 +01:00
parent a4235856af
commit a832541285
1 changed files with 5 additions and 2 deletions

View File

@ -263,15 +263,18 @@ class NovaComputeRelationsTests(CharmTestCase):
'Could not create ceph keyring: peer not ready?'
)
@patch.object(utils, 'service_name')
@patch.object(hooks, 'CONFIGS')
def test_ceph_changed_with_key_and_relation_data(self, configs):
def test_ceph_changed_with_key_and_relation_data(self, configs,
service_name):
configs.complete_contexts = MagicMock()
configs.complete_contexts.return_value = ['ceph']
configs.write = MagicMock()
service_name.return_value = 'nova-compute'
self.ensure_ceph_keyring.return_value = True
hooks.ceph_changed()
ex = [
call('/etc/ceph/ceph.conf'),
call('/var/lib/charm/nova-compute/ceph.conf'),
call('/etc/ceph/secret.xml'),
call('/etc/nova/nova.conf'),
]