Merge lp:~johnsca/charms/trusty/ethercalc/rq into lp:~joe/charms/trusty/ethercalc/trunk

Proposed by Cory Johns
Status: Merged
Merged at revision: 8
Proposed branch: lp:~johnsca/charms/trusty/ethercalc/rq
Merge into: lp:~joe/charms/trusty/ethercalc/trunk
Diff against target: 45 lines (+3/-14)
2 files modified
hooks/website-relation-joined (+1/-1)
tests/10-deploy (+2/-13)
To merge this branch: bzr merge lp:~johnsca/charms/trusty/ethercalc/rq
Reviewer Review Type Date Requested Status
Joe Liau merge Approve
Review via email: mp+276145@code.launchpad.net

Description of the change

Fixes for test and website-relation

To post a comment you must log in.
Revision history for this message
Joe Liau (joe) wrote :

Thank you, Cory.

review: Approve (merge)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/website-relation-joined'
2--- hooks/website-relation-joined 2015-09-27 02:39:25 +0000
3+++ hooks/website-relation-joined 2015-10-29 15:23:50 +0000
4@@ -7,6 +7,6 @@
5 juju-log "${JUJU_UNIT_NAME} website-relation-joined started."
6
7 address=`unit-get private-address`
8-relation-set hostname=${address}
9+relation-set hostname=${address} port=8000
10
11 juju-log "${JUJU_UNIT_NAME} website-relation-joined complete."
12
13=== modified file 'tests/10-deploy'
14--- tests/10-deploy 2015-09-27 02:39:25 +0000
15+++ tests/10-deploy 2015-10-29 15:23:50 +0000
16@@ -20,9 +20,9 @@
17 amulet.raise_status(amulet.SKIP, msg="Environment wasn't stood up in time")
18 except:
19 raise
20- cls.unit = cls.deployment.sentry.unit['ethercalc/0']
21+ cls.ethercalc_unit = cls.deployment.sentry['ethercalc'][0]
22
23- def test_website(self):
24+ def test_website(self):
25 ''' Test that ethercalc responds to HTTP get requests. '''
26 # Get the address for ethercalc.
27 server = self.ethercalc_unit.info['public-address']
28@@ -34,17 +34,6 @@
29 if 'EtherCalc' not in str(response.content):
30 message = 'EtherCalc was not in the HTTP response from {0}'
31 amulet.raise_status(amulet.FAIL, msg=message.format(url))
32- # Get the address for haproxy.
33- server = self.haproxy_unit.info['public-address']
34- port = '80'
35- # Create a URL to the haproxy unit
36- url = 'http://{0}:{1}'.format(server, port)
37- response = requests.get(url)
38- response.raise_for_status()
39- if 'EtherCalc' not in str(response.content):
40- message = 'EtherCalc was not in the HTTP response from {0}'
41- amulet.raise_status(amulet.FAIL, msg=message.format(url))
42- pass
43
44
45 if __name__ == '__main__':

Subscribers

People subscribed via source and target branches

to all changes: