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
=== modified file 'hooks/website-relation-joined'
--- hooks/website-relation-joined 2015-09-27 02:39:25 +0000
+++ hooks/website-relation-joined 2015-10-29 15:23:50 +0000
@@ -7,6 +7,6 @@
7juju-log "${JUJU_UNIT_NAME} website-relation-joined started."7juju-log "${JUJU_UNIT_NAME} website-relation-joined started."
88
9address=`unit-get private-address`9address=`unit-get private-address`
10relation-set hostname=${address}10relation-set hostname=${address} port=8000
1111
12juju-log "${JUJU_UNIT_NAME} website-relation-joined complete."12juju-log "${JUJU_UNIT_NAME} website-relation-joined complete."
1313
=== modified file 'tests/10-deploy'
--- tests/10-deploy 2015-09-27 02:39:25 +0000
+++ tests/10-deploy 2015-10-29 15:23:50 +0000
@@ -20,9 +20,9 @@
20 amulet.raise_status(amulet.SKIP, msg="Environment wasn't stood up in time")20 amulet.raise_status(amulet.SKIP, msg="Environment wasn't stood up in time")
21 except:21 except:
22 raise22 raise
23 cls.unit = cls.deployment.sentry.unit['ethercalc/0']23 cls.ethercalc_unit = cls.deployment.sentry['ethercalc'][0]
2424
25 def test_website(self):25 def test_website(self):
26 ''' Test that ethercalc responds to HTTP get requests. '''26 ''' Test that ethercalc responds to HTTP get requests. '''
27 # Get the address for ethercalc.27 # Get the address for ethercalc.
28 server = self.ethercalc_unit.info['public-address']28 server = self.ethercalc_unit.info['public-address']
@@ -34,17 +34,6 @@
34 if 'EtherCalc' not in str(response.content):34 if 'EtherCalc' not in str(response.content):
35 message = 'EtherCalc was not in the HTTP response from {0}'35 message = 'EtherCalc was not in the HTTP response from {0}'
36 amulet.raise_status(amulet.FAIL, msg=message.format(url))36 amulet.raise_status(amulet.FAIL, msg=message.format(url))
37 # Get the address for haproxy.
38 server = self.haproxy_unit.info['public-address']
39 port = '80'
40 # Create a URL to the haproxy unit
41 url = 'http://{0}:{1}'.format(server, port)
42 response = requests.get(url)
43 response.raise_for_status()
44 if 'EtherCalc' not in str(response.content):
45 message = 'EtherCalc was not in the HTTP response from {0}'
46 amulet.raise_status(amulet.FAIL, msg=message.format(url))
47 pass
4837
4938
50if __name__ == '__main__':39if __name__ == '__main__':

Subscribers

People subscribed via source and target branches

to all changes: