Clean up a unit test a bit.
This commit is contained in:
parent
13074a872d
commit
395cf28590
@ -180,19 +180,16 @@ class TestChangedHooks(CharmTestCase):
|
||||
@patch.object(hooks, 'git_install_requested')
|
||||
def test_config_changed_uses_remove_missing_force(self, git_requested,
|
||||
conf_https):
|
||||
'It writes out all config'
|
||||
'It uses the remove-missing-force config option'
|
||||
git_requested.return_value = False
|
||||
self.openstack_upgrade_available.return_value = False
|
||||
self.test_config.set('block-device', 'sdb /dev/sdc sde')
|
||||
self.test_config.set('volume-group', 'cinder-new')
|
||||
self.test_config.set('overwrite', 'True')
|
||||
self.test_config.set('remove-missing', True)
|
||||
self.test_config.set('block-device', 'sdb')
|
||||
self.test_config.set('remove-missing-force', True)
|
||||
hooks.hooks.execute(['hooks/config-changed'])
|
||||
self.configure_lvm_storage.assert_called_with(
|
||||
['sdb', '/dev/sdc', 'sde'],
|
||||
'cinder-new',
|
||||
True, True, True)
|
||||
['sdb'],
|
||||
'cinder-volumes',
|
||||
False, False, True)
|
||||
|
||||
@patch.object(hooks, 'configure_https')
|
||||
@patch.object(hooks, 'git_install_requested')
|
||||
|
Loading…
Reference in New Issue
Block a user