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

Proposed by Ryan Beisner
Status: Merged
Merged at revision: 14
Proposed branch: lp:~1chb1n/charms/trusty/odl-controller/next.1601-test-update1
Merge into: lp:~openstack-charmers-archive/charms/trusty/odl-controller/next
Diff against target: 187 lines (+163/-0)
5 files modified
tests/019-basic-trusty-mitaka (+11/-0)
tests/020-basic-wily-liberty (+9/-0)
tests/021-basic-xenial-mitaka (+9/-0)
tests/README (+113/-0)
tests/tests.yaml (+21/-0)
To merge this branch: bzr merge lp:~1chb1n/charms/trusty/odl-controller/next.1601-test-update1
Reviewer Review Type Date Requested Status
Liam Young (community) Approve
Review via email: mp+282064@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_lint_check #16874 odl-controller-next for 1chb1n mp282064
    LINT OK: passed

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

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

charm_unit_test #15765 odl-controller-next for 1chb1n mp282064
    UNIT OK: passed

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

14. By Ryan Beisner

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

15. By Ryan Beisner

Update tests/README

16. By Ryan Beisner

Update bundletester testplan yaml file

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

charm_lint_check #16897 odl-controller-next for 1chb1n mp282064
    LINT OK: passed

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

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

charm_unit_test #15789 odl-controller-next for 1chb1n mp282064
    UNIT OK: passed

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

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

Subscribers

People subscribed via source and target branches