Merge lp:~nicopace/charms/trusty/rabbitmq-server/all-tests into lp:charms/trusty/rabbitmq-server

Proposed by nicopace
Status: Merged
Merged at revision: 84
Proposed branch: lp:~nicopace/charms/trusty/rabbitmq-server/all-tests
Merge into: lp:charms/trusty/rabbitmq-server
Diff against target: 217 lines (+194/-1)
4 files modified
tests/00_setup.sh (+3/-1)
tests/10-outofthebox-testing (+30/-0)
tests/20-different-repositories (+63/-0)
tests/30-switch-ssl (+98/-0)
To merge this branch: bzr merge lp:~nicopace/charms/trusty/rabbitmq-server/all-tests
Reviewer Review Type Date Requested Status
Review Queue (community) automated testing Needs Fixing
charmers Pending
Review via email: mp+251284@code.launchpad.net

Description of the change

Merge of all rabbitmq tests:
* out of the box testing
* different repositories
* ssl

To post a comment you must log in.
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #2347 rabbitmq-server for nicopace mp251284
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/2347/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #2136 rabbitmq-server for nicopace mp251284
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/2136/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #2269 rabbitmq-server for nicopace mp251284
    AMULET FAIL: amulet-test missing

AMULET Results (max last 2 lines):
INFO:root:Search string not found in makefile target commands.
ERROR:root:No make target was executed.

Full amulet test output: http://paste.ubuntu.com/10452260/
Build: http://10.245.162.77:8080/job/charm_amulet_test/2269/

Revision history for this message
Review Queue (review-queue) wrote :

This items has failed automated testing! Results available here http://reports.vapour.ws/charm-tests/charm-bundle-test-11070-results

review: Needs Fixing (automated testing)
Revision history for this message
Antonio Rosales (arosales) wrote :
81. By nicopace

Updates based on mainstream.

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #2415 rabbitmq-server for nicopace mp251284
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/2415/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #2624 rabbitmq-server for nicopace mp251284
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/2624/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #2450 rabbitmq-server for nicopace mp251284
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
  ERROR subprocess encountered error code 1
  make: *** [functional_test] Error 1

Full amulet test output: http://paste.ubuntu.com/10586332/
Build: http://10.245.162.77:8080/job/charm_amulet_test/2450/

82. By nicopace

Changes pip3 to easy_install3

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #2625 rabbitmq-server for nicopace mp251284
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/2625/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #2416 rabbitmq-server for nicopace mp251284
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/2416/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #2451 rabbitmq-server for nicopace mp251284
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
  ERROR subprocess encountered error code 1
  make: *** [functional_test] Error 1

Full amulet test output: http://paste.ubuntu.com/10586491/
Build: http://10.245.162.77:8080/job/charm_amulet_test/2451/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/00_setup.sh'
2--- tests/00_setup.sh 2015-01-12 16:53:33 +0000
3+++ tests/00_setup.sh 2015-03-12 16:42:24 +0000
4@@ -13,4 +13,6 @@
5 fi
6
7 # Install any additional python packages, or software here.
8-sudo apt-get install -y python python-pika python3-requests
9+sudo apt-get install -y python python-pika python3-requests python3-setuptools
10+
11+sudo easy_install3 python3-pika
12
13=== added file 'tests/10-outofthebox-testing'
14--- tests/10-outofthebox-testing 1970-01-01 00:00:00 +0000
15+++ tests/10-outofthebox-testing 2015-03-12 16:42:24 +0000
16@@ -0,0 +1,30 @@
17+#!/usr/bin/python3
18+
19+import amulet
20+import pika
21+
22+d = amulet.Deployment()
23+
24+d.add('rabbitmq-server', charm='cs:trusty/rabbitmq-server')
25+d.expose('rabbitmq-server')
26+
27+# Don't forget to expose using d.expose(service)
28+
29+try:
30+ d.setup(timeout=3000)
31+ d.sentry.wait()
32+except amulet.helpers.TimeoutError:
33+ amulet.raise_status(amulet.SKIP, msg="Environment wasn't stood up in time")
34+except:
35+ raise
36+
37+server = d.sentry.unit['rabbitmq-server/0']
38+host = server.info['public-address']
39+
40+try:
41+ connection = pika.BlockingConnection(pika.ConnectionParameters(host=host))
42+except Exception as e:
43+ amulet.raise_status(
44+ amulet.FAIL,
45+ str(e)
46+ )
47
48=== added file 'tests/20-different-repositories'
49--- tests/20-different-repositories 1970-01-01 00:00:00 +0000
50+++ tests/20-different-repositories 2015-03-12 16:42:24 +0000
51@@ -0,0 +1,63 @@
52+#!/usr/bin/python3
53+
54+import amulet
55+import pika
56+
57+d = amulet.Deployment()
58+
59+d.add('rabbitmq-server', charm='cs:trusty/rabbitmq-server')
60+d.configure('rabbitmq-server', {
61+ "source": "deb http://www.rabbitmq.com/debian/ testing main",
62+ "key": """-----BEGIN PGP PUBLIC KEY BLOCK-----
63+Version: GnuPG v1.4.6 (GNU/Linux)
64+
65+mQGiBEaOQ/IRBACs/n609zN+OzlK9qDkFWwYKfPG+BlgqBj5MSy0XE2K8cE3bWSV
66+2WftTe/TGEfW0hknXt1PyBla0cnO9Up1xCn142vo8bvUug8WjrxLQBBiAf11FAOR
67+dt9roGe4IWw/Lakgb88re09ZYKmOL9H7MEpvMqtjdWjFSq4zeeGa8rGEswCgnQLb
68+ZD/MNlUNQwQVCs+vVRdgpzcD+QELSc2EeYl4tef0NiUaZQt+mjFTs3DjQNDTjXao
69+ETVAqECx4kavcshx5tSE5JbbQPIMiUgh0h9J3z3uZsBVnx6P82aW/QTw+jLhsQry
70+/i3Z/+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HkpQ42QcgrFuG7RMxDaQK6bdinNTl8aPmMoPamGzotSt4aMoVMiNxjatnlH
87+pqQ5UJlqbB5FGLnwJ0773WzgRdxIwSIxkFhL/Mq4agf4an8151kqcZCISQQYEQIA
88+CQUCRo5D+wIbDAAKCRD3uM6mBW6OVhLmAKCYY152B/10n7aUNKejs92NsNAnPACf
89+ZwbDOKBXGfkCPuRx5j/AGneASNU=
90+=Ry+c
91+-----END PGP PUBLIC KEY BLOCK-----"""
92+})
93+d.expose('rabbitmq-server')
94+
95+# Don't forget to expose using d.expose(service)
96+
97+try:
98+ d.setup(timeout=900)
99+ d.sentry.wait()
100+except amulet.helpers.TimeoutError:
101+ amulet.raise_status(amulet.SKIP, msg="Environment wasn't stood up in time")
102+except:
103+ raise
104+
105+server = d.sentry.unit['rabbitmq-server/0']
106+host = server.info['public-address']
107+
108+try:
109+ connection = pika.BlockingConnection(pika.ConnectionParameters(host=host))
110+except Exception as e:
111+ amulet.raise_status(
112+ amulet.FAIL,
113+ str(e)
114+ )
115
116=== added file 'tests/30-switch-ssl'
117--- tests/30-switch-ssl 1970-01-01 00:00:00 +0000
118+++ tests/30-switch-ssl 2015-03-12 16:42:24 +0000
119@@ -0,0 +1,98 @@
120+#!/usr/bin/python3
121+
122+import amulet
123+import pika
124+
125+d = amulet.Deployment()
126+
127+d.add('rabbitmq-server', charm='cs:trusty/rabbitmq-server')
128+d.expose('rabbitmq-server')
129+
130+# Don't forget to expose using d.expose(service)
131+
132+try:
133+ d.setup(timeout=900)
134+ d.sentry.wait()
135+except amulet.helpers.TimeoutError:
136+ amulet.raise_status(amulet.SKIP, msg="Environment wasn't stood up in time")
137+except:
138+ raise
139+
140+server = d.sentry.unit['rabbitmq-server/0']
141+host = server.info['public-address']
142+
143+# Connects without ssl
144+try:
145+ connection = pika.BlockingConnection(pika.ConnectionParameters(host=host,
146+ ssl=False))
147+except Exception as e:
148+ amulet.raise_status(
149+ amulet.FAIL,
150+ str(e)
151+ )
152+
153+# Doesn't connect with ssl
154+try:
155+ connection = pika.BlockingConnection(pika.ConnectionParameters(host=host,
156+ ssl=True))
157+except Exception as e:
158+ pass
159+else:
160+ amulet.raise_status(
161+ amulet.FAIL,
162+ 'SSL enabled when it shouldn\'t.'
163+ )
164+
165+d.configure('rabbitmq-server', {
166+ 'ssl': 'on'
167+})
168+d.sentry.wait()
169+
170+
171+# Connects without ssl
172+try:
173+ connection = pika.BlockingConnection(pika.ConnectionParameters(host=host,
174+ ssl=False))
175+except Exception as e:
176+ amulet.raise_status(
177+ amulet.FAIL,
178+ str(e)
179+ )
180+
181+# Connects with ssl
182+try:
183+ connection = pika.BlockingConnection(pika.ConnectionParameters(host=host,
184+ ssl=True))
185+except Exception as e:
186+ amulet.raise_status(
187+ amulet.FAIL,
188+ str(e)
189+ )
190+
191+d.configure('rabbitmq-server', {
192+ 'ssl': 'only'
193+})
194+d.sentry.wait()
195+
196+
197+# Doesn't connect without ssl
198+try:
199+ connection = pika.BlockingConnection(pika.ConnectionParameters(host=host,
200+ ssl=False))
201+except Exception as e:
202+ pass
203+else:
204+ amulet.raise_status(
205+ amulet.FAIL,
206+ "Connects without SSL when it shouldn't"
207+ )
208+
209+# Connects with ssl
210+try:
211+ connection = pika.BlockingConnection(pika.ConnectionParameters(host=host,
212+ ssl=True))
213+except Exception as e:
214+ amulet.raise_status(
215+ amulet.FAIL,
216+ str(e)
217+ )

Subscribers

People subscribed via source and target branches

to all changes: