Merge lp:~gnuoy/charms/trusty/openstack-dashboard/1420708 into lp:~openstack-charmers-archive/charms/trusty/openstack-dashboard/next

Proposed by Liam Young
Status: Merged
Merged at revision: 51
Proposed branch: lp:~gnuoy/charms/trusty/openstack-dashboard/1420708
Merge into: lp:~openstack-charmers-archive/charms/trusty/openstack-dashboard/next
Diff against target: 53 lines (+18/-0)
2 files modified
hooks/horizon_hooks.py (+4/-0)
unit_tests/test_horizon_hooks.py (+14/-0)
To merge this branch: bzr merge lp:~gnuoy/charms/trusty/openstack-dashboard/1420708
Reviewer Review Type Date Requested Status
James Page Approve
Review via email: mp+249303@code.launchpad.net
To post a comment you must log in.
52. By Liam Young

Remove -t option as it's not needed when openstack-origin is correctly set

Revision history for this message
James Page (james-page) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/horizon_hooks.py'
2--- hooks/horizon_hooks.py 2015-01-13 14:46:23 +0000
3+++ hooks/horizon_hooks.py 2015-02-11 11:37:08 +0000
4@@ -17,6 +17,7 @@
5 filter_installed_packages,
6 )
7 from charmhelpers.core.host import (
8+ lsb_release,
9 restart_on_change
10 )
11 from charmhelpers.contrib.openstack.utils import (
12@@ -58,6 +59,9 @@
13 packages = PACKAGES[:]
14 if os_release('openstack-dashboard') < 'icehouse':
15 packages += ['nodejs', 'node-less']
16+ if lsb_release()['DISTRIB_CODENAME'] == 'precise':
17+ # Explicitly upgrade python-six Bug#1420708
18+ apt_install('python-six', fatal=True)
19 apt_install(filter_installed_packages(packages), fatal=True)
20
21
22
23=== modified file 'unit_tests/test_horizon_hooks.py'
24--- unit_tests/test_horizon_hooks.py 2015-01-13 14:46:23 +0000
25+++ unit_tests/test_horizon_hooks.py 2015-02-11 11:37:08 +0000
26@@ -33,6 +33,7 @@
27 'get_iface_for_address',
28 'get_netmask_for_address',
29 'update_nrpe_config',
30+ 'lsb_release',
31 ]
32
33
34@@ -60,6 +61,19 @@
35 self.apt_update.assert_called_with(fatal=True)
36 self.apt_install.assert_called_with(['foo', 'bar'], fatal=True)
37
38+ def test_install_hook_precise(self):
39+ self.filter_installed_packages.return_value = ['foo', 'bar']
40+ self.os_release.return_value = 'icehouse'
41+ self.lsb_release.return_value = {'DISTRIB_CODENAME': 'precise'}
42+ self._call_hook('install')
43+ self.configure_installation_source.assert_called_with('distro')
44+ self.apt_update.assert_called_with(fatal=True)
45+ calls = [
46+ call('python-six', fatal=True),
47+ call(['foo', 'bar'], fatal=True),
48+ ]
49+ self.apt_install.assert_has_calls(calls)
50+
51 def test_install_hook_icehouse_pkgs(self):
52 self.os_release.return_value = 'icehouse'
53 self._call_hook('install')

Subscribers

People subscribed via source and target branches