Merge lp:~mbruzek/charms/precise/tomcat/trunk into lp:charms/tomcat

Proposed by Matt Bruzek on 2016-01-27
Status: Merged
Merged at revision: 15
Proposed branch: lp:~mbruzek/charms/precise/tomcat/trunk
Merge into: lp:charms/tomcat
Diff against target: 96 lines (+18/-14)
4 files modified
hooks/webapp-container-relation-joined (+6/-0)
hooks/webapp-relation-joined (+0/-6)
metadata.yaml (+6/-2)
tests/10-configured-deploy.py (+6/-6)
To merge this branch: bzr merge lp:~mbruzek/charms/precise/tomcat/trunk
Reviewer Review Type Date Requested Status
Kevin W Monroe Approve on 2016-01-27
Cory Johns 2016-01-27 Approve on 2016-01-27
Review via email: mp+284188@code.launchpad.net

Description of the change

A user suggested a different relation name that makes more sense.

This involved updating the metadata.yaml and renaming the relation file.

I also updated the tests to run with our latest best practices.

To post a comment you must log in.
Cory Johns (johnsca) wrote :

LGTM

review: Approve
Kevin W Monroe (kwmonroe) wrote :

LGTM, merged.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'hooks/webapp-container-relation-joined'
2--- hooks/webapp-container-relation-joined 1970-01-01 00:00:00 +0000
3+++ hooks/webapp-container-relation-joined 2016-01-27 22:05:19 +0000
4@@ -0,0 +1,6 @@
5+#!/bin/bash
6+
7+set -ex
8+
9+VERSION=`config-get tomcat_version`
10+relation-set webapp-path /var/lib/$VERSION/webapps
11
12=== removed file 'hooks/webapp-relation-joined'
13--- hooks/webapp-relation-joined 2015-01-22 23:19:37 +0000
14+++ hooks/webapp-relation-joined 1970-01-01 00:00:00 +0000
15@@ -1,6 +0,0 @@
16-#!/bin/bash
17-
18-set -ex
19-
20-VERSION=`config-get tomcat_version`
21-relation-set webapp-path /var/lib/$VERSION/webapps
22
23=== modified file 'metadata.yaml'
24--- metadata.yaml 2015-01-22 23:19:37 +0000
25+++ metadata.yaml 2016-01-27 22:05:19 +0000
26@@ -6,11 +6,15 @@
27 JavaServer Pages (JSP) specifications, and provides a "pure Java" HTTP
28 web server environment for Java web applications to run.
29
30-categories: ["app-servers"]
31+tags:
32+ - application_development
33+ - java
34+ - webapp
35+
36 provides:
37 website:
38 interface: http
39- webapp:
40+ webapp-container:
41 interface: java-webapp
42 scope: container
43 requires:
44
45=== modified file 'tests/10-configured-deploy.py'
46--- tests/10-configured-deploy.py 2014-10-10 08:56:18 +0000
47+++ tests/10-configured-deploy.py 2016-01-27 22:05:19 +0000
48@@ -55,7 +55,7 @@
49 'cluster_enabled': True
50 }
51
52-d = amulet.Deployment()
53+d = amulet.Deployment(series='precise')
54 # Add the tomcat charm to the deployment.
55 d.add('tomcat', units=scale)
56 d.add('memcached')
57@@ -83,18 +83,18 @@
58 raise
59
60 # Get the sentry unit for tomcat0.
61-tomcat_unit = d.sentry.unit['tomcat/0']
62+tomcat_unit = d.sentry['tomcat'][0]
63 # Get the public address for tomcat0.
64 tomcat0_address = tomcat_unit.info['public-address']
65 # Get the terracotta unit.
66-terracotta_unit = d.sentry.unit['terracotta/0']
67+terracotta_unit = d.sentry['terracotta'][0]
68 # Get the relation to terracotta.
69 terracotta_relation = terracotta_unit.relation('dso', 'tomcat:jndi-terracotta')
70 # Get the private address of terracotta to ensure the relation has that data.
71 terracotta_private_address = terracotta_relation['private-address']
72 print("terracotta private address " + terracotta_private_address)
73 # Get the memcached unit.
74-memcached_unit = d.sentry.unit['memcached/0']
75+memcached_unit = d.sentry['memcached'][0]
76 # Get the relation to memcached.
77 memcached_relation = memcached_unit.relation('cache', 'tomcat:jndi-memcached')
78 # Get the private address of memcached to ensure the relation has that data.
79@@ -118,7 +118,7 @@
80 tomcat1_address = address.decode().rstrip('\n')
81
82 ###############################################################################
83-## Read the /etc/tomcatX/default file to verifiy configuration settings.
84+## Read the /etc/tomcatX/default file to verify configuration settings.
85 ###############################################################################
86 # Read in the default file from the tomcat unit.
87 default_tomcat = tomcat_unit.file_contents('/etc/default/{0}'.format(
88@@ -169,7 +169,7 @@
89 static_member = server_xml[index:].split('\n')[0]
90 print(static_member)
91 print(tomcat1_address)
92-# Search for tomcat1 address in the tomcat0 server.xml to verifiy clustered.
93+# Search for tomcat1 address in the tomcat0 server.xml to verify clustered.
94 static_member.index(tomcat1_address)
95
96 ###############################################################################

Subscribers

People subscribed via source and target branches

to all changes: