~james-page/charms/trusty/cinder/worker-config

« back to all changes in this revision

Viewing changes to unit_tests/test_cinder_hooks.py

  • Committer: james.page at ubuntu
  • Date: 2014-10-06 21:49:00 UTC
  • mfrom: (45.1.14 cinder)
  • Revision ID: james.page@ubuntu.com-20141006214900-8ipsbvdjb5l5tlf3
[jamespage,r=gnuoy] Add support for HTTPS+HA in network-split configurations

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
import cinder_hooks as hooks
19
19
hooks.hooks._config_save = False
20
20
 
 
21
hooks.hooks._config_save = False
 
22
 
21
23
# Unpatch it now that its loaded.
22
24
utils.restart_map = _restart_map
23
25
utils.register_configs = _register_configs
59
61
    # charmhelpers.contrib.hahelpers.cluster_utils
60
62
    'canonical_url',
61
63
    'eligible_leader',
62
 
    'is_leader',
63
64
    'get_hacluster_config',
64
65
    'execd_preinstall',
65
66
    'get_ipv6_addr',
344
345
        }
345
346
        self.relation_set.assert_called_with(**expected)
346
347
 
347
 
    def test_identity_service_joined_no_leadership(self):
348
 
        'It does nothing on identity-joined when not eligible leader'
349
 
        self.eligible_leader.return_value = False
350
 
        hooks.hooks.execute(['hooks/identity-service-relation-joined'])
351
 
        self.assertFalse(self.relation_set.called)
352
 
 
353
348
    @patch('os.mkdir')
354
349
    def test_ceph_joined(self, mkdir):
355
350
        'It correctly prepares for a ceph changed hook'