[hopem,r=wolsen,gnuoy]

Ensure apache2 reloaded/restarted when https configured

Closes-Bug: #1410568
This commit is contained in:
Edward Hope-Morley
2015-03-31 09:37:29 +01:00
2 changed files with 16 additions and 5 deletions

View File

@@ -52,6 +52,7 @@ TO_PATCH = [
'get_netmask_for_address',
'get_address_in_network',
'update_nrpe_config',
'service_reload',
]
NEUTRON_CONF_DIR = "/etc/neutron"
@@ -483,8 +484,9 @@ class NeutronAPIHooksTests(CharmTestCase):
self.relation_ids.side_effect = self._fake_relids
_id_rel_joined = self.patch('identity_joined')
hooks.configure_https()
self.check_call.assert_called_with(['a2ensite',
'openstack_https_frontend'])
calls = [call('a2dissite', 'openstack_https_frontend'),
call('service', 'apache2', 'reload')]
self.check_call.assert_called_has_calls(calls)
self.assertTrue(_id_rel_joined.called)
def test_configure_https_nohttps(self):
@@ -492,6 +494,7 @@ class NeutronAPIHooksTests(CharmTestCase):
self.relation_ids.side_effect = self._fake_relids
_id_rel_joined = self.patch('identity_joined')
hooks.configure_https()
self.check_call.assert_called_with(['a2dissite',
'openstack_https_frontend'])
calls = [call('a2dissite', 'openstack_https_frontend'),
call('service', 'apache2', 'reload')]
self.check_call.assert_called_has_calls(calls)
self.assertTrue(_id_rel_joined.called)