Merge lp:~lazypower/charms/trusty/elasticsearch/fix-tests-unit-identifier into lp:charms/trusty/elasticsearch

Proposed by Charles Butler
Status: Rejected
Rejected by: Charles Butler
Proposed branch: lp:~lazypower/charms/trusty/elasticsearch/fix-tests-unit-identifier
Merge into: lp:charms/trusty/elasticsearch
Diff against target: 28 lines (+3/-3)
2 files modified
hooks/hooks.py (+1/-1)
tests/helpers/__init__.py (+2/-2)
To merge this branch: bzr merge lp:~lazypower/charms/trusty/elasticsearch/fix-tests-unit-identifier
Reviewer Review Type Date Requested Status
charmers Pending
Review via email: mp+290344@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Charles Butler (lazypower) wrote :

superceded by other merges

Unmerged revisions

43. By Charles Butler

Corrects a stale unit pointer issue with the tests

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/hooks.py'
2--- hooks/hooks.py 2015-10-27 22:30:30 +0000
3+++ hooks/hooks.py 2016-03-29 17:37:24 +0000
4@@ -88,7 +88,7 @@
5 'to: {}'.format(new_path))
6 os.chmod(new_path, 0700)
7 charmhelpers.core.host.service_stop('elasticsearch')
8- charmhelpers.core.host.rsync(os.path.join(old_path, ''), # Ensure we have trailing slashes
9+ charmhelpers.core.host.rsync(os.path.join(old_path, ''), # Ensure we have trailing slashes # noqa
10 os.path.join(new_path, ''),
11 options=['--archive'])
12 shutil.rmtree(old_path)
13
14=== modified file 'tests/helpers/__init__.py'
15--- tests/helpers/__init__.py 2014-10-30 01:02:33 +0000
16+++ tests/helpers/__init__.py 2016-03-29 17:37:24 +0000
17@@ -17,9 +17,9 @@
18
19
20 def curl_on_unit(curl_command, deployment, unit_number=0):
21- unit = "elasticsearch/{}".format(unit_number)
22+ unit = "elasticsearch"
23
24- response = deployment.sentry.unit[unit].run(curl_command)
25+ response = deployment.sentry.unit[unit][unit_number].run(curl_command)
26 if response[1] != 0:
27 msg = (
28 "Elastic search didn't respond to the command \n"

Subscribers

People subscribed via source and target branches