~astara-drivers/charms/trusty/keystone/astara-rebase

« back to all changes in this revision

Viewing changes to unit_tests/test_actions_git_reinstall.py

  • Committer: billy.olsen at canonical
  • Date: 2015-08-31 17:35:57 UTC
  • mfrom: (170.1.39 pause-and-resume)
  • Revision ID: billy.olsen@canonical.com-20150831173557-u0s0d0xsyky4i78g
[ack,r=billy-olsen,1chb1n,tealeg,adam-collard] Add pause/resume actions to keystone.

This changes introduces the pause and resume action set to the keystone charm. These
actions can be used to pause keystone services on a unit for maintenance activities.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
    config.return_value = 'keystone'
5
5
    import keystone_utils as utils  # noqa
6
6
 
7
 
with patch('keystone_utils.register_configs') as register_configs:
8
 
    import git_reinstall
 
7
    with patch('keystone_utils.register_configs') as register_configs:
 
8
        import git_reinstall
9
9
 
10
10
from test_utils import (
11
11
    CharmTestCase
36
36
    @patch.object(git_reinstall, 'action_fail')
37
37
    @patch.object(git_reinstall, 'git_install')
38
38
    @patch.object(git_reinstall, 'config_changed')
39
 
    def test_git_reinstall(self, config_changed, git_install, action_fail,
40
 
                           action_set):
 
39
    @patch('charmhelpers.contrib.openstack.utils.config')
 
40
    def test_git_reinstall(self, config, config_changed, git_install,
 
41
                           action_fail, action_set):
 
42
        config.return_value = openstack_origin_git
41
43
        self.test_config.set('openstack-origin-git', openstack_origin_git)
42
44
 
43
45
        git_reinstall.git_reinstall()