Merge lp:~tvansteenburgh/charms/precise/cakephp/fix-test-deps into lp:charms/cakephp

Proposed by Tim Van Steenburgh
Status: Merged
Merged at revision: 34
Proposed branch: lp:~tvansteenburgh/charms/precise/cakephp/fix-test-deps
Merge into: lp:charms/cakephp
Diff against target: 55 lines (+7/-7)
3 files modified
hooks/common.sh (+1/-1)
tests/00-setup.sh (+1/-2)
tests/helper.py (+5/-4)
To merge this branch: bzr merge lp:~tvansteenburgh/charms/precise/cakephp/fix-test-deps
Reviewer Review Type Date Requested Status
Matt Bruzek (community) Approve
Review via email: mp+244002@code.launchpad.net

Description of the change

Fix test deps

To post a comment you must log in.
Revision history for this message
Matt Bruzek (mbruzek) wrote :

+1 LGTM Thanks for taking a look at this Tim!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/common.sh'
2--- hooks/common.sh 2014-08-15 09:01:00 +0000
3+++ hooks/common.sh 2014-12-08 15:14:04 +0000
4@@ -6,7 +6,7 @@
5 install_deps(){
6 juju-log "Installing packages"
7 apt-get update
8- apt-get install -y apache2 php5-cgi php5-mysql curl php5-gd wget libapache2-mod-php5 mysql-client
9+ apt-get install -y apache2 php5-cgi php5-mysql curl php5-gd wget libapache2-mod-php5 mysql-client git
10 }
11
12 #
13
14=== modified file 'tests/00-setup.sh'
15--- tests/00-setup.sh 2014-05-18 08:55:52 +0000
16+++ tests/00-setup.sh 2014-12-08 15:14:04 +0000
17@@ -4,5 +4,4 @@
18
19 sudo add-apt-repository -y ppa:juju/stable
20 sudo apt-get update
21-sudo apt-get -y install amulet
22-sudo pip install --upgrade requests
23+sudo apt-get -y install python3-amulet python3-requests
24
25=== modified file 'tests/helper.py'
26--- tests/helper.py 2014-06-17 18:08:21 +0000
27+++ tests/helper.py 2014-12-08 15:14:04 +0000
28@@ -3,14 +3,15 @@
29 import amulet
30 import requests
31
32+
33 class BaseTest(object):
34- def __init__(self, options={}):
35+ def __init__(self, options=None):
36 self.deploy = amulet.Deployment()
37-
38+
39 self.deploy.add('mysql')
40 self.deploy.add('cakephp')
41
42- if (options != {}):
43+ if options:
44 self.deploy.configure('cakephp', options)
45
46 self.deploy.relate('mysql:db', 'cakephp:database')
47@@ -24,7 +25,7 @@
48 amulet.raise_status(amulet.FAIL, msg='Environment did not set up in %d seconds' % seconds)
49
50 self.cakephp_unit = self.deploy.sentry.unit['cakephp/0']
51-
52+
53 host = self.cakephp_unit.info['public-address']
54 port = self.cakephp_unit.info['open-ports'][0].split('/')[0]
55 self.base_url = 'http://{}:{}'.format(host, port)

Subscribers

People subscribed via source and target branches

to all changes: