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
1=== modified file 'hooks/config-changed'
2--- hooks/config-changed 2015-07-23 12:34:50 +0000
3+++ hooks/config-changed 2015-07-28 09:26:12 +0000
4@@ -211,40 +211,40 @@
5
6 # Check integrity of downloaded package
7 if [ "$ARCHITECTURE" == "x86_64" ];then
8- if [ "b9cc0b783b482de2092d5c387de05cda2e922413" != "`sha1sum $CHARM_DIR/$ARCHIVE_DIR/WAS_V8.5.5_1_OF_3.zip | cut -d" " -f1`" ]; then
9+ if [ "b9cc0b783b482de2092d5c387de05cda2e922413" != "`sha1sum $CHARM_DIR/$ARCHIVE_DIR/$was_base_pkg1 | cut -d" " -f1`" ]; then
10 juju-log "IBM WAS Base: IBM WAS package1 is corrupt."
11 exit 0
12 fi
13- if [ "74a52b1b5aaedd67c0727db90aff9dc63ff28f4e" != "`sha1sum $CHARM_DIR/$ARCHIVE_DIR/WAS_V8.5.5_2_OF_3.zip | cut -d" " -f1`" ]; then
14+ if [ "74a52b1b5aaedd67c0727db90aff9dc63ff28f4e" != "`sha1sum $CHARM_DIR/$ARCHIVE_DIR/$was_base_pkg2 | cut -d" " -f1`" ]; then
15 juju-log "IBM WAS Base: IBM WAS package2 is corrupt."
16 exit 0
17 fi
18- if [ "e6943fa4a4a7a1384fad1faa54289106f0e57979" != "`sha1sum $CHARM_DIR/$ARCHIVE_DIR/WAS_V8.5.5_3_OF_3.zip | cut -d" " -f1`" ]; then
19+ if [ "e6943fa4a4a7a1384fad1faa54289106f0e57979" != "`sha1sum $CHARM_DIR/$ARCHIVE_DIR/$was_base_pkg3 | cut -d" " -f1`" ]; then
20 juju-log "IBM WAS Base: IBM WAS package3 is corrupt."
21 exit 0
22 fi
23- if [ "895863b932334a78cccce6c73ec98d35ba98639b" != "`sha1sum $CHARM_DIR/$ARCHIVE_DIR/8.5.5-WS-WAS-FP0000004-part1.zip | cut -d" " -f1`" ]; then
24+ if [ "895863b932334a78cccce6c73ec98d35ba98639b" != "`sha1sum $CHARM_DIR/$ARCHIVE_DIR/$was_base_fixpack1 | cut -d" " -f1`" ]; then
25 juju-log "IBM WAS Base: IBM WAS Fix Pack part1 is corrupt."
26 exit 0
27 fi
28- if [ "8f8560746c6fb0f87cd47801a014e7c34fccc4cc" != "`sha1sum $CHARM_DIR/$ARCHIVE_DIR/8.5.5-WS-WAS-FP0000004-part2.zip | cut -d" " -f1`" ]; then
29+ if [ "8f8560746c6fb0f87cd47801a014e7c34fccc4cc" != "`sha1sum $CHARM_DIR/$ARCHIVE_DIR/$was_base_fixpack2 | cut -d" " -f1`" ]; then
30 juju-log "IBM WAS Base: IBM WAS Fix Pack part2 is corrupt."
31 exit 0
32 fi
33 elif [ "$ARCHITECTURE" == "ppc64le" ];then
34- if [ "62cc5a2d23a2ff828d2b4dcd9ac754b3ff994292" != "`sha1sum $CHARM_DIR/$ARCHIVE_DIR/WAS_V8.5.5_FOR_POWERLE_ML.zip | cut -d" " -f1`" ]; then
35+ if [ "62cc5a2d23a2ff828d2b4dcd9ac754b3ff994292" != "`sha1sum $CHARM_DIR/$ARCHIVE_DIR/$was_base_ppc64le_pkg1 | cut -d" " -f1`" ]; then
36 juju-log "IBM WAS Base: IBM WAS package1 is corrupt."
37 exit 0
38 fi
39- if [ "bc475ccd6f918bf858ccbb48d82e5adc2c7b3fa9" != "`sha1sum $CHARM_DIR/$ARCHIVE_DIR/WAS_V8.5.5_2_OF_2_FOR_POWERLE_ML.zip | cut -d" " -f1`" ]; then
40+ if [ "bc475ccd6f918bf858ccbb48d82e5adc2c7b3fa9" != "`sha1sum $CHARM_DIR/$ARCHIVE_DIR/$was_base_ppc64le_pkg2 | cut -d" " -f1`" ]; then
41 juju-log "IBM WAS Base: IBM WAS package2 is corrupt."
42 exit 0
43 fi
44- if [ "c0f38a16b87b7e6e7c5c0f609fb3c1a61a3b7e8e" != "`sha1sum $CHARM_DIR/$ARCHIVE_DIR/8.5.5-WS-WAS-LE-FP0000006-part1.zip | cut -d" " -f1`" ]; then
45+ if [ "c0f38a16b87b7e6e7c5c0f609fb3c1a61a3b7e8e" != "`sha1sum $CHARM_DIR/$ARCHIVE_DIR/$was_base_ppc64le_fixpack1 | cut -d" " -f1`" ]; then
46 juju-log "IBM WAS Base: IBM WAS Fix Pack part1 is corrupt."
47 exit 0
48 fi
49- if [ "c8fe75b915fa2ecd183af208eff7df0464342ff8" != "`sha1sum $CHARM_DIR/$ARCHIVE_DIR/8.5.5-WS-WAS-LE-FP0000006-part2.zip | cut -d" " -f1`" ]; then
50+ if [ "c8fe75b915fa2ecd183af208eff7df0464342ff8" != "`sha1sum $CHARM_DIR/$ARCHIVE_DIR/$was_base_ppc64le_fixpack2 | cut -d" " -f1`" ]; then
51 juju-log "IBM WAS Base: IBM WAS Fix Pack part2 is corrupt."
52 exit 0
53 fi
54
55=== modified file 'tests/10-bundles-test.py'
56--- tests/10-bundles-test.py 2015-07-18 10:47:10 +0000
57+++ tests/10-bundles-test.py 2015-07-28 09:26:12 +0000
58@@ -40,25 +40,34 @@
59 with open(bundle_path, 'r') as bundle_file:
60 contents = yaml.safe_load(bundle_file)
61 d.load(contents)
62- d.add("haproxy")
63+ d.add('haproxy')
64
65 # Software doesn't actually install until you accept the license
66 d.configure('was-base', {'accept-ibm-websphere-license': True, 'accept-ibm-im-license': True,'was_url': url, 'im_file_name': pkg })
67 d.configure('haproxy', {'enable_monitoring': True })
68 d.relate('haproxy:reverseproxy', 'was-base:website')
69+ d.expose('haproxy')
70 d.setup(seconds_to_wait)
71 d.sentry.wait(seconds_to_wait)
72 cls.d = d
73+ haproxy_unit = d.sentry.unit['haproxy/0']
74+ haproxy_address = haproxy_unit.info['public-address']
75+ haurl = 'http://%s/ibm/console/unsecureLogon.jsp' % haproxy_address
76+ page = requests.get(haurl)
77+ # Raise an exception if the url was not a valid web page.
78+ page.raise_for_status()
79+ print('Successfully got the WAS Base web page through haproxy IP address.')
80+
81
82 def test_deployed(self):
83- self.assertTrue(self.d.deployed)
84+ self.assertTrue(self.d.deployed)
85
86 def test_website(self):
87- unit = self.d.sentry.unit['was-base/0']
88- url = 'http://%s:9060/ibm/console' % unit.info['public-address']
89- response = requests.get(url)
90+ unit = self.d.sentry.unit['was-base/0']
91+ url = 'http://%s:9060/ibm/console' % unit.info['public-address']
92+ response = requests.get(url)
93 # Raise an exception if the url was not a valid web page.
94- response.raise_for_status()
95+ response.raise_for_status()
96
97 if __name__ == '__main__':
98 unittest.main()

Subscribers

People subscribed via source and target branches

to all changes: