Merge lp:~geethas1/charms/trusty/was-base/wasbase-fix into lp:~ibmcharmers/charms/trusty/was-base/devel

Proposed by Geetha S
Status: Merged
Merged at revision: 28
Proposed branch: lp:~geethas1/charms/trusty/was-base/wasbase-fix
Merge into: lp:~ibmcharmers/charms/trusty/was-base/devel
Diff against target: 98 lines (+24/-15)
2 files modified
hooks/config-changed (+9/-9)
tests/10-bundles-test.py (+15/-6)
To merge this branch: bzr merge lp:~geethas1/charms/trusty/was-base/wasbase-fix
Reviewer Review Type Date Requested Status
vsr Pending
Review via email: mp+265807@code.launchpad.net
To post a comment you must log in.
28. By Geetha S

Committing testcase changes for WAS Base

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'hooks/config-changed'
--- hooks/config-changed 2015-07-23 12:34:50 +0000
+++ hooks/config-changed 2015-07-28 09:26:12 +0000
@@ -211,40 +211,40 @@
211 211
212 # Check integrity of downloaded package212 # Check integrity of downloaded package
213 if [ "$ARCHITECTURE" == "x86_64" ];then 213 if [ "$ARCHITECTURE" == "x86_64" ];then
214 if [ "b9cc0b783b482de2092d5c387de05cda2e922413" != "`sha1sum $CHARM_DIR/$ARCHIVE_DIR/WAS_V8.5.5_1_OF_3.zip | cut -d" " -f1`" ]; then214 if [ "b9cc0b783b482de2092d5c387de05cda2e922413" != "`sha1sum $CHARM_DIR/$ARCHIVE_DIR/$was_base_pkg1 | cut -d" " -f1`" ]; then
215 juju-log "IBM WAS Base: IBM WAS package1 is corrupt."215 juju-log "IBM WAS Base: IBM WAS package1 is corrupt."
216 exit 0216 exit 0
217 fi217 fi
218 if [ "74a52b1b5aaedd67c0727db90aff9dc63ff28f4e" != "`sha1sum $CHARM_DIR/$ARCHIVE_DIR/WAS_V8.5.5_2_OF_3.zip | cut -d" " -f1`" ]; then218 if [ "74a52b1b5aaedd67c0727db90aff9dc63ff28f4e" != "`sha1sum $CHARM_DIR/$ARCHIVE_DIR/$was_base_pkg2 | cut -d" " -f1`" ]; then
219 juju-log "IBM WAS Base: IBM WAS package2 is corrupt."219 juju-log "IBM WAS Base: IBM WAS package2 is corrupt."
220 exit 0220 exit 0
221 fi221 fi
222 if [ "e6943fa4a4a7a1384fad1faa54289106f0e57979" != "`sha1sum $CHARM_DIR/$ARCHIVE_DIR/WAS_V8.5.5_3_OF_3.zip | cut -d" " -f1`" ]; then222 if [ "e6943fa4a4a7a1384fad1faa54289106f0e57979" != "`sha1sum $CHARM_DIR/$ARCHIVE_DIR/$was_base_pkg3 | cut -d" " -f1`" ]; then
223 juju-log "IBM WAS Base: IBM WAS package3 is corrupt."223 juju-log "IBM WAS Base: IBM WAS package3 is corrupt."
224 exit 0224 exit 0
225 fi225 fi
226 if [ "895863b932334a78cccce6c73ec98d35ba98639b" != "`sha1sum $CHARM_DIR/$ARCHIVE_DIR/8.5.5-WS-WAS-FP0000004-part1.zip | cut -d" " -f1`" ]; then226 if [ "895863b932334a78cccce6c73ec98d35ba98639b" != "`sha1sum $CHARM_DIR/$ARCHIVE_DIR/$was_base_fixpack1 | cut -d" " -f1`" ]; then
227 juju-log "IBM WAS Base: IBM WAS Fix Pack part1 is corrupt."227 juju-log "IBM WAS Base: IBM WAS Fix Pack part1 is corrupt."
228 exit 0228 exit 0
229 fi229 fi
230 if [ "8f8560746c6fb0f87cd47801a014e7c34fccc4cc" != "`sha1sum $CHARM_DIR/$ARCHIVE_DIR/8.5.5-WS-WAS-FP0000004-part2.zip | cut -d" " -f1`" ]; then230 if [ "8f8560746c6fb0f87cd47801a014e7c34fccc4cc" != "`sha1sum $CHARM_DIR/$ARCHIVE_DIR/$was_base_fixpack2 | cut -d" " -f1`" ]; then
231 juju-log "IBM WAS Base: IBM WAS Fix Pack part2 is corrupt."231 juju-log "IBM WAS Base: IBM WAS Fix Pack part2 is corrupt."
232 exit 0232 exit 0
233 fi233 fi
234 elif [ "$ARCHITECTURE" == "ppc64le" ];then234 elif [ "$ARCHITECTURE" == "ppc64le" ];then
235 if [ "62cc5a2d23a2ff828d2b4dcd9ac754b3ff994292" != "`sha1sum $CHARM_DIR/$ARCHIVE_DIR/WAS_V8.5.5_FOR_POWERLE_ML.zip | cut -d" " -f1`" ]; then235 if [ "62cc5a2d23a2ff828d2b4dcd9ac754b3ff994292" != "`sha1sum $CHARM_DIR/$ARCHIVE_DIR/$was_base_ppc64le_pkg1 | cut -d" " -f1`" ]; then
236 juju-log "IBM WAS Base: IBM WAS package1 is corrupt."236 juju-log "IBM WAS Base: IBM WAS package1 is corrupt."
237 exit 0237 exit 0
238 fi238 fi
239 if [ "bc475ccd6f918bf858ccbb48d82e5adc2c7b3fa9" != "`sha1sum $CHARM_DIR/$ARCHIVE_DIR/WAS_V8.5.5_2_OF_2_FOR_POWERLE_ML.zip | cut -d" " -f1`" ]; then239 if [ "bc475ccd6f918bf858ccbb48d82e5adc2c7b3fa9" != "`sha1sum $CHARM_DIR/$ARCHIVE_DIR/$was_base_ppc64le_pkg2 | cut -d" " -f1`" ]; then
240 juju-log "IBM WAS Base: IBM WAS package2 is corrupt."240 juju-log "IBM WAS Base: IBM WAS package2 is corrupt."
241 exit 0241 exit 0
242 fi242 fi
243 if [ "c0f38a16b87b7e6e7c5c0f609fb3c1a61a3b7e8e" != "`sha1sum $CHARM_DIR/$ARCHIVE_DIR/8.5.5-WS-WAS-LE-FP0000006-part1.zip | cut -d" " -f1`" ]; then243 if [ "c0f38a16b87b7e6e7c5c0f609fb3c1a61a3b7e8e" != "`sha1sum $CHARM_DIR/$ARCHIVE_DIR/$was_base_ppc64le_fixpack1 | cut -d" " -f1`" ]; then
244 juju-log "IBM WAS Base: IBM WAS Fix Pack part1 is corrupt."244 juju-log "IBM WAS Base: IBM WAS Fix Pack part1 is corrupt."
245 exit 0245 exit 0
246 fi246 fi
247 if [ "c8fe75b915fa2ecd183af208eff7df0464342ff8" != "`sha1sum $CHARM_DIR/$ARCHIVE_DIR/8.5.5-WS-WAS-LE-FP0000006-part2.zip | cut -d" " -f1`" ]; then247 if [ "c8fe75b915fa2ecd183af208eff7df0464342ff8" != "`sha1sum $CHARM_DIR/$ARCHIVE_DIR/$was_base_ppc64le_fixpack2 | cut -d" " -f1`" ]; then
248 juju-log "IBM WAS Base: IBM WAS Fix Pack part2 is corrupt."248 juju-log "IBM WAS Base: IBM WAS Fix Pack part2 is corrupt."
249 exit 0249 exit 0
250 fi250 fi
251251
=== modified file 'tests/10-bundles-test.py'
--- tests/10-bundles-test.py 2015-07-18 10:47:10 +0000
+++ tests/10-bundles-test.py 2015-07-28 09:26:12 +0000
@@ -40,25 +40,34 @@
40 with open(bundle_path, 'r') as bundle_file:40 with open(bundle_path, 'r') as bundle_file:
41 contents = yaml.safe_load(bundle_file)41 contents = yaml.safe_load(bundle_file)
42 d.load(contents)42 d.load(contents)
43 d.add("haproxy")43 d.add('haproxy')
4444
45 # Software doesn't actually install until you accept the license45 # Software doesn't actually install until you accept the license
46 d.configure('was-base', {'accept-ibm-websphere-license': True, 'accept-ibm-im-license': True,'was_url': url, 'im_file_name': pkg })46 d.configure('was-base', {'accept-ibm-websphere-license': True, 'accept-ibm-im-license': True,'was_url': url, 'im_file_name': pkg })
47 d.configure('haproxy', {'enable_monitoring': True })47 d.configure('haproxy', {'enable_monitoring': True })
48 d.relate('haproxy:reverseproxy', 'was-base:website')48 d.relate('haproxy:reverseproxy', 'was-base:website')
49 d.expose('haproxy')
49 d.setup(seconds_to_wait)50 d.setup(seconds_to_wait)
50 d.sentry.wait(seconds_to_wait)51 d.sentry.wait(seconds_to_wait)
51 cls.d = d52 cls.d = d
53 haproxy_unit = d.sentry.unit['haproxy/0']
54 haproxy_address = haproxy_unit.info['public-address']
55 haurl = 'http://%s/ibm/console/unsecureLogon.jsp' % haproxy_address
56 page = requests.get(haurl)
57 # Raise an exception if the url was not a valid web page.
58 page.raise_for_status()
59 print('Successfully got the WAS Base web page through haproxy IP address.')
60
5261
53 def test_deployed(self):62 def test_deployed(self):
54 self.assertTrue(self.d.deployed)63 self.assertTrue(self.d.deployed)
5564
56 def test_website(self):65 def test_website(self):
57 unit = self.d.sentry.unit['was-base/0']66 unit = self.d.sentry.unit['was-base/0']
58 url = 'http://%s:9060/ibm/console' % unit.info['public-address']67 url = 'http://%s:9060/ibm/console' % unit.info['public-address']
59 response = requests.get(url)68 response = requests.get(url)
60 # Raise an exception if the url was not a valid web page.69 # Raise an exception if the url was not a valid web page.
61 response.raise_for_status()70 response.raise_for_status()
6271
63if __name__ == '__main__':72if __name__ == '__main__':
64 unittest.main()73 unittest.main()

Subscribers

People subscribed via source and target branches

to all changes: