Merge lp:~stub/charms/trusty/cassandra/spike into lp:charms/trusty/cassandra

Proposed by Stuart Bishop on 2015-11-02
Status: Merged
Merged at revision: 367
Proposed branch: lp:~stub/charms/trusty/cassandra/spike
Merge into: lp:charms/trusty/cassandra
Diff against target: 36 lines (+6/-5)
1 file modified
tests/test_integration.py (+6/-5)
To merge this branch: bzr merge lp:~stub/charms/trusty/cassandra/spike
Reviewer Review Type Date Requested Status
Charles Butler (community) 2015-11-02 Approve on 2015-12-16
Review Queue (community) automated testing Approve on 2015-11-27
Review via email: mp+276372@code.launchpad.net

Description of the Change

Update the integration tests to work with Juju 1.25.

With Juju 1.25, unit names will be unique in the environment and unit names from a previously deployed service with the same name will not be reused. This means we can no longer assume that 'cassandra/0' will exist.

To post a comment you must log in.
Review Queue (review-queue) wrote :

This item has failed automated testing! Results available here http://juju-ci.vapour.ws:8080/job/charm-bundle-test-lxc/1437/

review: Needs Fixing (automated testing)
367. By Stuart Bishop on 2015-11-13

Fix a better hidden failure from Juju 1.25 unit numbering changes

Review Queue (review-queue) wrote :

This item has failed automated testing! Results available here http://juju-ci.vapour.ws:8080/job/charm-bundle-test-aws/1424/

review: Needs Fixing (automated testing)
Review Queue (review-queue) wrote :

The results (PASS) are in and available here: http://juju-ci.vapour.ws:8080/job/charm-bundle-test-lxc/1561/

review: Approve (automated testing)
Review Queue (review-queue) wrote :

The results (PASS) are in and available here: http://juju-ci.vapour.ws:8080/job/charm-bundle-test-aws/1543/

review: Approve (automated testing)
Review Queue (review-queue) wrote :

The results (PASS) are in and available here: http://juju-ci.vapour.ws:8080/job/charm-bundle-test-aws/1544/

review: Approve (automated testing)
Charles Butler (lazypower) wrote :

+1 LGTM.

Thanks stub!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/test_integration.py'
2--- tests/test_integration.py 2015-08-19 09:57:40 +0000
3+++ tests/test_integration.py 2015-11-13 05:38:23 +0000
4@@ -187,7 +187,7 @@
5
6 def get_client_relinfo(self, relname):
7 # We only need one unit, even if rf > 1
8- s = self.deployment.sentry['cassandra/0']
9+ s = self.deployment.sentry['cassandra'][0]
10 relinfo = s.relation(relname, 'client:{}'.format(relname))
11 return relinfo
12
13@@ -287,11 +287,11 @@
14 # and data migrated. Instead, keep checking until our condition
15 # is met, or a timeout reached.
16 timeout = time.time() + 300
17- for unit_num in range(0, self.rf):
18- unit = 'cassandra/{}'.format(unit_num)
19+ for s in self.deployment.sentry['cassandra']:
20+ unit = s.info['unit_name']
21+ unit_num = s.info['unit']
22 with self.subTest(unit=unit):
23 while True:
24- s = self.deployment.sentry[unit]
25 # Attempting to diagnose Amulet failures. I suspect
26 # SSH host keys again, per Bug #802117
27 try:
28@@ -354,7 +354,8 @@
29 self.assertIsInstance(fail, AuthenticationFailed)
30
31 def test_cqlsh(self):
32- subprocess.check_output(['juju', 'ssh', 'cassandra/0',
33+ unit = self.deployment.sentry['cassandra'][0].info['unit_name']
34+ subprocess.check_output(['juju', 'ssh', unit,
35 'sudo -H cqlsh -e exit'],
36 stderr=subprocess.STDOUT)
37

Subscribers

People subscribed via source and target branches

to all changes: