Merge lp:~tvansteenburgh/charms/trusty/mediawiki/test-fixes into lp:charms/trusty/mediawiki

Proposed by Tim Van Steenburgh on 2015-11-09
Status: Merged
Merged at revision: 85
Proposed branch: lp:~tvansteenburgh/charms/trusty/mediawiki/test-fixes
Merge into: lp:charms/trusty/mediawiki
Diff against target: 39 lines (+6/-6)
1 file modified
tests/100-deploy (+6/-6)
To merge this branch: bzr merge lp:~tvansteenburgh/charms/trusty/mediawiki/test-fixes
Reviewer Review Type Date Requested Status
Kevin W Monroe 2015-11-09 Approve on 2015-11-19
Konstantinos Tsakalozos Approve on 2015-11-19
Review Queue (community) automated testing Approve on 2015-11-12
Review via email: mp+277054@code.launchpad.net

Description of the change

Update tests to not hardcode unit names.

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

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

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/1397/

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-hp/1131/

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-azure/1151/

review: Approve (automated testing)

Jut run the test on local environment, lgtm. Thank you for your contributions!

review: Approve
Kevin W Monroe (kwmonroe) wrote :

Merged. This update should hit the charm store shortly. Thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/100-deploy'
2--- tests/100-deploy 2015-10-16 23:18:26 +0000
3+++ tests/100-deploy 2015-11-09 20:26:08 +0000
4@@ -29,13 +29,14 @@
5 except:
6 raise
7
8-mw_unit = d.sentry.unit['mediawiki/0']
9-mysql_unit = d.sentry.unit['mysql/0']
10+mw_unit = d.sentry['mediawiki'][0]
11+mysql_unit = d.sentry['mysql'][0]
12+memcached_unit = d.sentry['memcached'][0]
13
14 #############################################################
15 # Validate the DB Relationship using Amulet Sentry
16 #############################################################
17-sql_relation = d.sentry.unit['mysql/0'].relation('db', 'mediawiki:db')
18+sql_relation = mysql_unit.relation('db', 'mediawiki:db')
19
20 # Validate that the database server was set for the configuration of MediaWiki
21 #Set search term for comparison, and cache the flag in the configuration file
22@@ -52,8 +53,7 @@
23 #############################################################
24 # Validate the Memcached Relationship using Amulet Sentry
25 #############################################################
26-memcached_relation = d.sentry.unit['memcached/0'].relation(
27- 'cache', 'mediawiki:cache')
28+memcached_relation = memcached_unit.relation('cache', 'mediawiki:cache')
29 output, code = mw_unit.run("cat /etc/mediawiki/memcached_settings.php \
30 | grep wgMemCachedServers | tr -d \'array\(\)\; | awk '{printf $3}'")
31
32@@ -63,7 +63,7 @@
33 #############################################################
34 # Validate the installation configuration using Requests
35 #############################################################
36-mw_ip = d.sentry.unit['mediawiki/0'].info['public-address']
37+mw_ip = mw_unit.info['public-address']
38 mw_url = "http://%s/mediawiki/index.php" % mw_ip
39 response = requests.get(mw_url)
40

Subscribers

People subscribed via source and target branches

to all changes: