Merge lp:~gnuoy/charms/trusty/glance/untest-tox-fix into lp:~openstack-charmers-archive/charms/trusty/glance/next

Proposed by Liam Young on 2015-09-28
Status: Merged
Merged at revision: 142
Proposed branch: lp:~gnuoy/charms/trusty/glance/untest-tox-fix
Merge into: lp:~openstack-charmers-archive/charms/trusty/glance/next
Diff against target: 44 lines (+9/-5)
2 files modified
unit_tests/test_glance_contexts.py (+8/-2)
unit_tests/test_glance_utils.py (+1/-3)
To merge this branch: bzr merge lp:~gnuoy/charms/trusty/glance/untest-tox-fix
Reviewer Review Type Date Requested Status
OpenStack Charmers 2015-09-28 Pending
Review via email: mp+272578@code.launchpad.net
To post a comment you must log in.
Edward Hope-Morley (hopem) wrote :

lgtm +1 if oscsi agrees.

143. By Liam Young on 2015-09-28

Fix test_glance_ipv6_context_service_enabled which was passing by accident rather than by design

charm_lint_check #10899 glance-next for gnuoy mp272578
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/10899/

charm_unit_test #10116 glance-next for gnuoy mp272578
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/10116/

charm_amulet_test #6854 glance-next for gnuoy mp272578
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
make: *** [functional_test] Error 1
ERROR:root:Make target returned non-zero.

Full amulet test output: http://paste.ubuntu.com/12605835/
Build: http://10.245.162.77:8080/job/charm_amulet_test/6854/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'unit_tests/test_glance_contexts.py'
2--- unit_tests/test_glance_contexts.py 2015-08-27 11:44:11 +0000
3+++ unit_tests/test_glance_contexts.py 2015-09-28 11:53:43 +0000
4@@ -81,17 +81,23 @@
5 'ext_ports': [9282],
6 'namespace': 'glance'})
7
8+ @patch('charmhelpers.contrib.openstack.context.config')
9 @patch("subprocess.check_output")
10- def test_glance_ipv6_context_service_enabled(self, mock_subprocess):
11+ def test_glance_ipv6_context_service_enabled(self, mock_subprocess,
12+ mock_config):
13 self.config.return_value = True
14+ mock_config.return_value = True
15 mock_subprocess.return_value = 'true'
16 ctxt = contexts.GlanceIPv6Context()
17 self.assertEquals(ctxt(), {'bind_host': '::',
18 'registry_host': '[::]'})
19
20+ @patch('charmhelpers.contrib.openstack.context.config')
21 @patch("subprocess.check_output")
22- def test_glance_ipv6_context_service_disabled(self, mock_subprocess):
23+ def test_glance_ipv6_context_service_disabled(self, mock_subprocess,
24+ mock_config):
25 self.config.return_value = False
26+ mock_config.return_value = False
27 mock_subprocess.return_value = 'false'
28 ctxt = contexts.GlanceIPv6Context()
29 self.assertEquals(ctxt(), {'bind_host': '0.0.0.0',
30
31=== modified file 'unit_tests/test_glance_utils.py'
32--- unit_tests/test_glance_utils.py 2015-08-25 14:41:24 +0000
33+++ unit_tests/test_glance_utils.py 2015-09-28 11:53:43 +0000
34@@ -5,9 +5,7 @@
35
36 os.environ['JUJU_UNIT_NAME'] = 'glance'
37
38-with patch('charmhelpers.core.hookenv.config') as config:
39- import hooks.glance_utils as utils
40-
41+import hooks.glance_utils as utils
42 from test_utils import (
43 CharmTestCase,
44 )

Subscribers

People subscribed via source and target branches