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

Proposed by Tim Van Steenburgh
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 Approve
Konstantinos Tsakalozos (community) Approve
Review Queue (community) automated testing Approve
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.
Revision history for this message
Tim Van Steenburgh (tvansteenburgh) wrote :
Revision history for this message
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)
Revision history for this message
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)
Revision history for this message
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)
Revision history for this message
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)
Revision history for this message
Konstantinos Tsakalozos (kos.tsakalozos) wrote :

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

review: Approve
Revision history for this message
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
=== modified file 'tests/100-deploy'
--- tests/100-deploy 2015-10-16 23:18:26 +0000
+++ tests/100-deploy 2015-11-09 20:26:08 +0000
@@ -29,13 +29,14 @@
29except:29except:
30 raise30 raise
3131
32mw_unit = d.sentry.unit['mediawiki/0']32mw_unit = d.sentry['mediawiki'][0]
33mysql_unit = d.sentry.unit['mysql/0']33mysql_unit = d.sentry['mysql'][0]
34memcached_unit = d.sentry['memcached'][0]
3435
35#############################################################36#############################################################
36# Validate the DB Relationship using Amulet Sentry37# Validate the DB Relationship using Amulet Sentry
37#############################################################38#############################################################
38sql_relation = d.sentry.unit['mysql/0'].relation('db', 'mediawiki:db')39sql_relation = mysql_unit.relation('db', 'mediawiki:db')
3940
40# Validate that the database server was set for the configuration of MediaWiki41# Validate that the database server was set for the configuration of MediaWiki
41#Set search term for comparison, and cache the flag in the configuration file42#Set search term for comparison, and cache the flag in the configuration file
@@ -52,8 +53,7 @@
52#############################################################53#############################################################
53# Validate the Memcached Relationship using Amulet Sentry54# Validate the Memcached Relationship using Amulet Sentry
54#############################################################55#############################################################
55memcached_relation = d.sentry.unit['memcached/0'].relation(56memcached_relation = memcached_unit.relation('cache', 'mediawiki:cache')
56 'cache', 'mediawiki:cache')
57output, code = mw_unit.run("cat /etc/mediawiki/memcached_settings.php \57output, code = mw_unit.run("cat /etc/mediawiki/memcached_settings.php \
58 | grep wgMemCachedServers | tr -d \'array\(\)\; | awk '{printf $3}'")58 | grep wgMemCachedServers | tr -d \'array\(\)\; | awk '{printf $3}'")
5959
@@ -63,7 +63,7 @@
63#############################################################63#############################################################
64# Validate the installation configuration using Requests64# Validate the installation configuration using Requests
65#############################################################65#############################################################
66mw_ip = d.sentry.unit['mediawiki/0'].info['public-address']66mw_ip = mw_unit.info['public-address']
67mw_url = "http://%s/mediawiki/index.php" % mw_ip67mw_url = "http://%s/mediawiki/index.php" % mw_ip
68response = requests.get(mw_url)68response = requests.get(mw_url)
6969

Subscribers

People subscribed via source and target branches

to all changes: