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
=== modified file 'tests/00_setup.sh'
--- tests/00_setup.sh 2015-01-12 16:53:33 +0000
+++ tests/00_setup.sh 2015-03-12 16:42:24 +0000
@@ -13,4 +13,6 @@
13fi13fi
1414
15# Install any additional python packages, or software here.15# Install any additional python packages, or software here.
16sudo apt-get install -y python python-pika python3-requests16sudo apt-get install -y python python-pika python3-requests python3-setuptools
17
18sudo easy_install3 python3-pika
1719
=== added file 'tests/10-outofthebox-testing'
--- tests/10-outofthebox-testing 1970-01-01 00:00:00 +0000
+++ tests/10-outofthebox-testing 2015-03-12 16:42:24 +0000
@@ -0,0 +1,30 @@
1#!/usr/bin/python3
2
3import amulet
4import pika
5
6d = amulet.Deployment()
7
8d.add('rabbitmq-server', charm='cs:trusty/rabbitmq-server')
9d.expose('rabbitmq-server')
10
11# Don't forget to expose using d.expose(service)
12
13try:
14 d.setup(timeout=3000)
15 d.sentry.wait()
16except amulet.helpers.TimeoutError:
17 amulet.raise_status(amulet.SKIP, msg="Environment wasn't stood up in time")
18except:
19 raise
20
21server = d.sentry.unit['rabbitmq-server/0']
22host = server.info['public-address']
23
24try:
25 connection = pika.BlockingConnection(pika.ConnectionParameters(host=host))
26except Exception as e:
27 amulet.raise_status(
28 amulet.FAIL,
29 str(e)
30 )
031
=== added file 'tests/20-different-repositories'
--- tests/20-different-repositories 1970-01-01 00:00:00 +0000
+++ tests/20-different-repositories 2015-03-12 16:42:24 +0000
@@ -0,0 +1,63 @@
1#!/usr/bin/python3
2
3import amulet
4import pika
5
6d = amulet.Deployment()
7
8d.add('rabbitmq-server', charm='cs:trusty/rabbitmq-server')
9d.configure('rabbitmq-server', {
10 "source": "deb http://www.rabbitmq.com/debian/ testing main",
11 "key": """-----BEGIN PGP PUBLIC KEY BLOCK-----
12Version: GnuPG v1.4.6 (GNU/Linux)
13
14mQGiBEaOQ/IRBACs/n609zN+OzlK9qDkFWwYKfPG+BlgqBj5MSy0XE2K8cE3bWSV
152WftTe/TGEfW0hknXt1PyBla0cnO9Up1xCn142vo8bvUug8WjrxLQBBiAf11FAOR
16dt9roGe4IWw/Lakgb88re09ZYKmOL9H7MEpvMqtjdWjFSq4zeeGa8rGEswCgnQLb
17ZD/MNlUNQwQVCs+vVRdgpzcD+QELSc2EeYl4tef0NiUaZQt+mjFTs3DjQNDTjXao
18ETVAqECx4kavcshx5tSE5JbbQPIMiUgh0h9J3z3uZsBVnx6P82aW/QTw+jLhsQry
19/i3Z/+pS66mk6EWhAAYF/SPVqM/06BZh0ZvUmeG9WGGJXD9CUN1Wfi2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qbB5FGLnwJ0773WzgRdxIwSIxkFhL/Mq4agf4an8151kqcZCISQQYEQIA
37CQUCRo5D+wIbDAAKCRD3uM6mBW6OVhLmAKCYY152B/10n7aUNKejs92NsNAnPACf
38ZwbDOKBXGfkCPuRx5j/AGneASNU=
39=Ry+c
40-----END PGP PUBLIC KEY BLOCK-----"""
41})
42d.expose('rabbitmq-server')
43
44# Don't forget to expose using d.expose(service)
45
46try:
47 d.setup(timeout=900)
48 d.sentry.wait()
49except amulet.helpers.TimeoutError:
50 amulet.raise_status(amulet.SKIP, msg="Environment wasn't stood up in time")
51except:
52 raise
53
54server = d.sentry.unit['rabbitmq-server/0']
55host = server.info['public-address']
56
57try:
58 connection = pika.BlockingConnection(pika.ConnectionParameters(host=host))
59except Exception as e:
60 amulet.raise_status(
61 amulet.FAIL,
62 str(e)
63 )
064
=== added file 'tests/30-switch-ssl'
--- tests/30-switch-ssl 1970-01-01 00:00:00 +0000
+++ tests/30-switch-ssl 2015-03-12 16:42:24 +0000
@@ -0,0 +1,98 @@
1#!/usr/bin/python3
2
3import amulet
4import pika
5
6d = amulet.Deployment()
7
8d.add('rabbitmq-server', charm='cs:trusty/rabbitmq-server')
9d.expose('rabbitmq-server')
10
11# Don't forget to expose using d.expose(service)
12
13try:
14 d.setup(timeout=900)
15 d.sentry.wait()
16except amulet.helpers.TimeoutError:
17 amulet.raise_status(amulet.SKIP, msg="Environment wasn't stood up in time")
18except:
19 raise
20
21server = d.sentry.unit['rabbitmq-server/0']
22host = server.info['public-address']
23
24# Connects without ssl
25try:
26 connection = pika.BlockingConnection(pika.ConnectionParameters(host=host,
27 ssl=False))
28except Exception as e:
29 amulet.raise_status(
30 amulet.FAIL,
31 str(e)
32 )
33
34# Doesn't connect with ssl
35try:
36 connection = pika.BlockingConnection(pika.ConnectionParameters(host=host,
37 ssl=True))
38except Exception as e:
39 pass
40else:
41 amulet.raise_status(
42 amulet.FAIL,
43 'SSL enabled when it shouldn\'t.'
44 )
45
46d.configure('rabbitmq-server', {
47 'ssl': 'on'
48})
49d.sentry.wait()
50
51
52# Connects without ssl
53try:
54 connection = pika.BlockingConnection(pika.ConnectionParameters(host=host,
55 ssl=False))
56except Exception as e:
57 amulet.raise_status(
58 amulet.FAIL,
59 str(e)
60 )
61
62# Connects with ssl
63try:
64 connection = pika.BlockingConnection(pika.ConnectionParameters(host=host,
65 ssl=True))
66except Exception as e:
67 amulet.raise_status(
68 amulet.FAIL,
69 str(e)
70 )
71
72d.configure('rabbitmq-server', {
73 'ssl': 'only'
74})
75d.sentry.wait()
76
77
78# Doesn't connect without ssl
79try:
80 connection = pika.BlockingConnection(pika.ConnectionParameters(host=host,
81 ssl=False))
82except Exception as e:
83 pass
84else:
85 amulet.raise_status(
86 amulet.FAIL,
87 "Connects without SSL when it shouldn't"
88 )
89
90# Connects with ssl
91try:
92 connection = pika.BlockingConnection(pika.ConnectionParameters(host=host,
93 ssl=True))
94except Exception as e:
95 amulet.raise_status(
96 amulet.FAIL,
97 str(e)
98 )

Subscribers

People subscribed via source and target branches

to all changes: