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

Proposed by Ryan Beisner
Status: Merged
Merged at revision: 83
Proposed branch: lp:~1chb1n/charms/trusty/percona-cluster/next.1601-test-update1
Merge into: lp:~openstack-charmers-archive/charms/trusty/percona-cluster/next
Diff against target: 153 lines (+116/-2)
3 files modified
Makefile (+1/-0)
tests/README (+113/-0)
tests/tests.yaml (+2/-2)
To merge this branch: bzr merge lp:~1chb1n/charms/trusty/percona-cluster/next.1601-test-update1
Reviewer Review Type Date Requested Status
Liam Young (community) Approve
Review via email: mp+282074@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 #16875 percona-cluster-next for 1chb1n mp282074
    LINT OK: passed

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

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

charm_unit_test #15761 percona-cluster-next for 1chb1n mp282074
    UNIT OK: passed

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

83. By Ryan Beisner

Move 00-setup to prevent extra, unnecessary bootstrap in test runs.

84. By Ryan Beisner

Update tests/README

85. By Ryan Beisner

Update bundletester testplan yaml file

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

charm_unit_test #15788 percona-cluster-next for 1chb1n mp282074
    UNIT OK: passed

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

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

charm_lint_check #16909 percona-cluster-next for 1chb1n mp282074
    LINT OK: passed

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

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

Subscribers

People subscribed via source and target branches