Merge lp:~1chb1n/charms/trusty/rabbitmq-server/next.1601-test-update1 into lp:~openstack-charmers-archive/charms/trusty/rabbitmq-server/next

Proposed by Ryan Beisner
Status: Merged
Merged at revision: 128
Proposed branch: lp:~1chb1n/charms/trusty/rabbitmq-server/next.1601-test-update1
Merge into: lp:~openstack-charmers-archive/charms/trusty/rabbitmq-server/next
Diff against target: 190 lines (+131/-18)
5 files modified
tests/019-basic-trusty-mitaka (+11/-0)
tests/019-basic-vivid-kilo (+0/-9)
tests/021-basic-xenial-mitaka (+9/-0)
tests/README (+109/-8)
tests/tests.yaml (+2/-1)
To merge this branch: bzr merge lp:~1chb1n/charms/trusty/rabbitmq-server/next.1601-test-update1
Reviewer Review Type Date Requested Status
Liam Young (community) Approve
Review via email: mp+282059@code.launchpad.net

Description of the change

Cosmetic updates to tests/dir and Makefile to standardize *os-charms, prep for 16.01. No changes to test code, hooks or charmhelpers.

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

charm_unit_test #15733 rabbitmq-server-next for 1chb1n mp282059
    UNIT OK: passed

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

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

charm_lint_check #16848 rabbitmq-server-next for 1chb1n mp282059
    LINT OK: passed

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

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

charm_unit_test #15749 rabbitmq-server-next for 1chb1n mp282059
    UNIT OK: passed

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

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

charm_lint_check #16869 rabbitmq-server-next for 1chb1n mp282059
    LINT OK: passed

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

126. By Ryan Beisner

remove amulet tests for unsupported releases

127. By Ryan Beisner

Re-number amulet test file names; add missing combos as not-executable for now.

128. By Ryan Beisner

Update tests/README

129. By Ryan Beisner

Update bundletester testplan yaml file

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

charm_lint_check #16892 rabbitmq-server-next for 1chb1n mp282059
    LINT OK: passed

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

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

charm_unit_test #15778 rabbitmq-server-next for 1chb1n mp282059
    UNIT OK: passed

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

Revision history for this message
Liam Young (gnuoy) wrote :

Approved

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== renamed file 'tests/020-basic-trusty-liberty' => 'tests/018-basic-trusty-liberty'
2=== added file 'tests/019-basic-trusty-mitaka'
3--- tests/019-basic-trusty-mitaka 1970-01-01 00:00:00 +0000
4+++ tests/019-basic-trusty-mitaka 2016-01-08 21:48:00 +0000
5@@ -0,0 +1,11 @@
6+#!/usr/bin/python
7+
8+"""Amulet tests on a basic rabbitmq-server deployment on trusty-liberty."""
9+
10+from basic_deployment import RmqBasicDeployment
11+
12+if __name__ == '__main__':
13+ deployment = RmqBasicDeployment(series='trusty',
14+ openstack='cloud:trusty-liberty',
15+ source='cloud:trusty-updates/liberty')
16+ deployment.run_tests()
17
18=== removed file 'tests/019-basic-vivid-kilo'
19--- tests/019-basic-vivid-kilo 2015-09-03 18:58:14 +0000
20+++ tests/019-basic-vivid-kilo 1970-01-01 00:00:00 +0000
21@@ -1,9 +0,0 @@
22-#!/usr/bin/python
23-
24-"""Amulet tests on a basic rabbitmq-server deployment on vivid-kilo."""
25-
26-from basic_deployment import RmqBasicDeployment
27-
28-if __name__ == '__main__':
29- deployment = RmqBasicDeployment(series='vivid')
30- deployment.run_tests()
31
32=== renamed file 'tests/021-basic-wily-liberty' => 'tests/020-basic-wily-liberty'
33=== added file 'tests/021-basic-xenial-mitaka'
34--- tests/021-basic-xenial-mitaka 1970-01-01 00:00:00 +0000
35+++ tests/021-basic-xenial-mitaka 2016-01-08 21:48:00 +0000
36@@ -0,0 +1,9 @@
37+#!/usr/bin/python
38+
39+"""Amulet tests on a basic rabbitmq-server deployment on xenial-mitaka."""
40+
41+from basic_deployment import RmqBasicDeployment
42+
43+if __name__ == '__main__':
44+ deployment = RmqBasicDeployment(series='xenial')
45+ deployment.run_tests()
46
47=== modified file 'tests/README'
48--- tests/README 2015-10-21 05:05:53 +0000
49+++ tests/README 2016-01-08 21:48:00 +0000
50@@ -1,12 +1,113 @@
51-This directory provides Amulet tests that focus on verification of
52-rabbitmq-server basic deployments.
53-
54-test_* methods are called in lexical sort order, although each individual test
55-should be idempotent, and expected to pass regardless of run order.
56-
57-Test name convention to ensure desired test order:
58+This directory provides Amulet tests to verify basic deployment functionality
59+from the perspective of this charm, its requirements and its features, as
60+exercised in a subset of the full OpenStack deployment test bundle topology.
61+
62+Reference: lp:openstack-charm-testing for full test bundles.
63+
64+A single topology and configuration is defined and deployed, once for each of
65+the defined Ubuntu:OpenStack release combos. The ongoing goal is for this
66+charm to always possess tests and combo definitions for all currently-supported
67+release combinations of U:OS.
68+
69+test_* methods are called in lexical sort order, as with most runners. However,
70+each individual test method should be idempotent and expected to pass regardless
71+of run order or Ubuntu:OpenStack combo. When writing or modifying tests,
72+ensure that every individual test is not dependent on another test_ method.
73+
74+Test naming convention, purely for code organization purposes:
75 1xx service and endpoint checks
76 2xx relation checks
77 3xx config checks
78 4xx functional checks
79- 9xx restarts and other final checks
80+ 9xx restarts, config changes, actions and other final checks
81+
82+In order to run tests, charm-tools and juju must be installed:
83+ sudo add-apt-repository ppa:juju/stable
84+ sudo apt-get update
85+ sudo apt-get install charm-tools juju juju-deployer amulet
86+
87+Alternatively, tests may be exercised with proposed or development versions
88+of juju and related tools:
89+
90+ # juju proposed version
91+ sudo add-apt-repository ppa:juju/proposed
92+ sudo apt-get update
93+ sudo apt-get install charm-tools juju juju-deployer
94+
95+ # juju development version
96+ sudo add-apt-repository ppa:juju/devel
97+ sudo apt-get update
98+ sudo apt-get install charm-tools juju juju-deployer
99+
100+Some tests may need to download files. If a web proxy server is required in
101+the environment, the AMULET_HTTP_PROXY environment variable must be set and
102+passed into the juju test command. This is unrelated to juju's http proxy
103+settings or behavior.
104+
105+The following examples demonstrate different ways that tests can be executed.
106+All examples are run from the charm's root directory.
107+
108+ * To run all +x tests in the tests directory:
109+
110+ bzr branch lp:charms/trusty/foo
111+ cd foo
112+ make functional_test
113+
114+ * To run the tests against a specific release combo as defined in tests/:
115+
116+ bzr branch lp:charms/trusty/foo
117+ cd foo
118+ juju test -v -p AMULET_HTTP_PROXY 015-basic-trusty-icehouse
119+
120+ * To run tests and keep the juju environment deployed after a failure:
121+
122+ bzr branch lp:charms/trusty/foo
123+ cd foo
124+ juju test --set-e -v -p AMULET_HTTP_PROXY 015-basic-trusty-icehouse
125+
126+ * To re-run a test module against an already deployed environment (one
127+ that was deployed by a previous call to 'juju test --set-e'):
128+
129+ ./tests/015-basic-trusty-icehouse
130+
131+ * Even with --set-e, `juju test` will tear down the deployment when all
132+ tests pass. The following work flow may be more effective when
133+ iterating on test writing.
134+
135+ bzr branch lp:charms/trusty/foo
136+ cd foo
137+ ./tests/setup/00-setup
138+ juju bootstrap
139+ ./tests/015-basic-trusty-icehouse
140+ # make some changes, run tests again
141+ ./tests/015-basic-trusty-icehouse
142+ # make some changes, run tests again
143+ ./tests/015-basic-trusty-icehouse
144+
145+ * There may be test definitions in the tests/ dir which are not set +x
146+ executable. This is generally true for deprecated releases, or for
147+ upcoming releases which are not yet validated and enabled. To enable
148+ and run these tests:
149+ bzr branch lp:charms/trusty/foo
150+ cd foo
151+ ls tests
152+ chmod +x tests/017-basic-trusty-kilo
153+ ./tests/setup/00-setup
154+ juju bootstrap
155+ ./tests/017-basic-trusty-kilo
156+
157+
158+Additional notes:
159+
160+ * Use DEBUG to turn on debug logging, use ERROR otherwise.
161+ u = OpenStackAmuletUtils(ERROR)
162+ u = OpenStackAmuletUtils(DEBUG)
163+
164+ * To interact with the deployed environment:
165+ export OS_USERNAME=admin
166+ export OS_PASSWORD=openstack
167+ export OS_TENANT_NAME=admin
168+ export OS_REGION_NAME=RegionOne
169+ export OS_AUTH_URL=${OS_AUTH_PROTOCOL:-http}://`juju-deployer -e trusty -f keystone`:5000/v2.0
170+ keystone user-list
171+ glance image-list
172
173=== modified file 'tests/tests.yaml'
174--- tests/tests.yaml 2015-10-06 14:11:56 +0000
175+++ tests/tests.yaml 2016-01-08 21:48:00 +0000
176@@ -1,5 +1,5 @@
177 bootstrap: true
178-reset: true
179+reset: false
180 virtualenv: true
181 makefile:
182 - lint
183@@ -9,6 +9,7 @@
184 packages:
185 - amulet
186 - distro-info-data
187+ - python-ceilometerclient
188 - python-cinderclient
189 - python-distro-info
190 - python-glanceclient

Subscribers

People subscribed via source and target branches