Merge lp:~ev/uci-engine/directory-reorg into lp:uci-engine

Proposed by Evan
Status: Needs review
Proposed branch: lp:~ev/uci-engine/directory-reorg
Merge into: lp:uci-engine
Prerequisite: lp:~ev/uci-engine/guard-against-breaking-virtualenvs
Diff against target: 310 lines (+103/-41)
15 files modified
britney_proxy/bin/uci-britney-post-deploy (+1/-1)
testing/run_tests.py (+2/-2)
tests/integration/test_britney.py (+1/-1)
tests/integration/test_bsbuilder.py (+1/-1)
tests/integration/test_image_builder.py (+1/-1)
tests/integration/test_ppacreator.py (+1/-1)
tests/integration/test_publisher.py (+1/-1)
tests/integration/test_rabbit.py (+1/-1)
tests/integration/test_style.py (+45/-0)
tests/integration/test_test_runner.py (+1/-1)
tests/integration/test_ticket_system.py (+1/-1)
tests/integration/test_validator.py (+1/-1)
tests/integration/test_webui.py (+1/-1)
tests/project/test_static.py (+0/-28)
tests/project/test_style.py (+45/-0)
To merge this branch: bzr merge lp:~ev/uci-engine/directory-reorg
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Canonical CI Engineering Pending
Review via email: mp+242797@code.launchpad.net

This proposal supersedes a proposal from 2014-11-25.

Commit message

Split apart tests/ into integration and projects directories. Opportunistically pick up tests under bin/.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:905
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~ev/uci-engine/directory-reorg/+merge/242797/+edit-commit-message

http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/1746/
Executed test runs:

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/1746/rebuild

review: Needs Fixing (continuous-integration)

Unmerged revisions

905. By Evan

Add the project and bin tests to the orphan group in run-tests.

904. By Evan

Factor out style tests.

903. By Evan

Merge with guard-against-breaking-virtualenvs branch.

902. By Evan

Split apart tests directory into integration and project tests.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'britney_proxy/bin/uci-britney-post-deploy'
2--- britney_proxy/bin/uci-britney-post-deploy 2014-10-15 09:25:55 +0000
3+++ britney_proxy/bin/uci-britney-post-deploy 2014-11-25 15:45:34 +0000
4@@ -29,7 +29,7 @@
5 sys.path.insert(0, BRANCH_ROOT)
6
7
8-from tests import deployers
9+from testing import deployers
10
11
12 def main(args):
13
14=== renamed file 'tests/deployers.py' => 'testing/deployers.py'
15=== modified file 'testing/run_tests.py'
16--- testing/run_tests.py 2014-11-03 21:04:50 +0000
17+++ testing/run_tests.py 2014-11-25 15:45:34 +0000
18@@ -308,7 +308,7 @@
19
20 :return: The test suite for all collected tests.
21 """
22- components = ['juju-deployer']
23+ components = ['juju-deployer', 'tests/project', 'bin']
24 loader = loaders.Loader()
25 suite = loader.suiteClass()
26 for c in components:
27@@ -330,7 +330,7 @@
28 """
29 loader = loaders.Loader()
30 suite = loader.suiteClass()
31- suite.addTests(loader.loadTestsFromTree('tests'))
32+ suite.addTests(loader.loadTestsFromTree('tests/integration'))
33 suite = filters.include_regexps(include_regexps, suite)
34 suite = filters.exclude_regexps(exclude_regexps, suite)
35 return suite
36
37=== added directory 'tests/integration'
38=== added file 'tests/integration/__init__.py'
39=== renamed file 'tests/test_britney.py' => 'tests/integration/test_britney.py'
40--- tests/test_britney.py 2014-11-03 12:59:48 +0000
41+++ tests/integration/test_britney.py 2014-11-25 15:45:34 +0000
42@@ -25,7 +25,7 @@
43 image_store,
44 )
45 import deploy
46-import deployers
47+from testing import deployers
48 from ucitests import (
49 assertions,
50 fixtures,
51
52=== renamed file 'tests/test_bsbuilder.py' => 'tests/integration/test_bsbuilder.py'
53--- tests/test_bsbuilder.py 2014-06-23 19:41:51 +0000
54+++ tests/integration/test_bsbuilder.py 2014-11-25 15:45:34 +0000
55@@ -16,7 +16,7 @@
56
57
58 import unittest
59-import deployers
60+from testing import deployers
61
62
63 class TestBsBuilder(deployers.DeployerTest):
64
65=== renamed file 'tests/test_data_store.py' => 'tests/integration/test_data_store.py'
66=== renamed file 'tests/test_image_builder.py' => 'tests/integration/test_image_builder.py'
67--- tests/test_image_builder.py 2014-10-07 10:04:01 +0000
68+++ tests/integration/test_image_builder.py 2014-11-25 15:45:34 +0000
69@@ -16,7 +16,7 @@
70
71
72 import unittest
73-import deployers
74+from testing import deployers
75
76
77 class TestImageBuilder(deployers.DeployerTest):
78
79=== renamed file 'tests/test_image_store.py' => 'tests/integration/test_image_store.py'
80=== renamed file 'tests/test_ppacreator.py' => 'tests/integration/test_ppacreator.py'
81--- tests/test_ppacreator.py 2014-10-30 20:46:10 +0000
82+++ tests/integration/test_ppacreator.py 2014-11-25 15:45:34 +0000
83@@ -17,7 +17,7 @@
84 import json
85 import uuid
86 import unittest
87-import deployers
88+from testing import deployers
89 import deploy
90
91 from ci_utils import amqp_utils
92
93=== renamed file 'tests/test_publisher.py' => 'tests/integration/test_publisher.py'
94--- tests/test_publisher.py 2014-10-07 10:04:01 +0000
95+++ tests/integration/test_publisher.py 2014-11-25 15:45:34 +0000
96@@ -18,7 +18,7 @@
97
98
99 import unittest
100-import deployers
101+from testing import deployers
102
103
104 class TestPublisher(deployers.DeployerTest):
105
106=== renamed file 'tests/test_rabbit.py' => 'tests/integration/test_rabbit.py'
107--- tests/test_rabbit.py 2014-10-23 14:07:48 +0000
108+++ tests/integration/test_rabbit.py 2014-11-25 15:45:34 +0000
109@@ -14,7 +14,7 @@
110 # along with this program. If not, see <http://www.gnu.org/licenses/>.
111 import unittest
112
113-import deployers
114+from testing import deployers
115 from ucitests import fixtures
116
117 from ci_utils import amqp_utils
118
119=== added file 'tests/integration/test_style.py'
120--- tests/integration/test_style.py 1970-01-01 00:00:00 +0000
121+++ tests/integration/test_style.py 2014-11-25 15:45:34 +0000
122@@ -0,0 +1,45 @@
123+# Ubuntu CI Engine
124+# Copyright 2014 Canonical Ltd.
125+
126+# This program is free software: you can redistribute it and/or modify it
127+# under the terms of the GNU Affero General Public License version 3, as
128+# published by the Free Software Foundation.
129+
130+# This program is distributed in the hope that it will be useful, but
131+# WITHOUT ANY WARRANTY; without even the implied warranties of
132+# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
133+# PURPOSE. See the GNU Affero General Public License for more details.
134+
135+# You should have received a copy of the GNU Affero General Public License
136+# along with this program. If not, see <http://www.gnu.org/licenses/>.
137+
138+import os
139+import unittest
140+
141+
142+HERE = os.path.abspath(os.path.dirname(__file__))
143+
144+
145+from testing import styles
146+
147+
148+class TestPep8(styles.TestPep8):
149+
150+ directory = HERE
151+
152+
153+class TestPyflakes(styles.TestPyflakes):
154+
155+ directory = HERE
156+
157+
158+class TestBinPep8(styles.TestPep8):
159+ """Pep8 tests for the 'bin' directory in branch root."""
160+
161+ directory = os.path.abspath(os.path.join(HERE, '..', 'bin'))
162+
163+
164+class TestBinPyflakes(styles.TestPyflakes):
165+ """Pyflakes tests for the 'bin' directory in branch root."""
166+
167+ directory = os.path.abspath(os.path.join(HERE, '..', 'bin'))
168
169=== renamed file 'tests/test_test_runner.py' => 'tests/integration/test_test_runner.py'
170--- tests/test_test_runner.py 2014-10-15 10:35:04 +0000
171+++ tests/integration/test_test_runner.py 2014-11-25 15:45:34 +0000
172@@ -24,7 +24,7 @@
173 image_store,
174 )
175 import deploy
176-import deployers
177+from testing import deployers
178 from ucitests import (
179 assertions,
180 )
181
182=== renamed file 'tests/test_ticket_system.py' => 'tests/integration/test_ticket_system.py'
183--- tests/test_ticket_system.py 2014-11-25 01:21:41 +0000
184+++ tests/integration/test_ticket_system.py 2014-11-25 15:45:34 +0000
185@@ -16,7 +16,7 @@
186 import httplib2
187 import json
188 import unittest
189-import deployers
190+from testing import deployers
191
192 from ci_utils.ticket_states import TicketWorkflowStep
193
194
195=== renamed file 'tests/test_validator.py' => 'tests/integration/test_validator.py'
196--- tests/test_validator.py 2014-08-14 17:21:56 +0000
197+++ tests/integration/test_validator.py 2014-11-25 15:45:34 +0000
198@@ -15,7 +15,7 @@
199 # along with this program. If not, see <http://www.gnu.org/licenses/>.
200
201 import unittest
202-import deployers
203+from testing import deployers
204
205
206 class TestValidator(deployers.DeployerTest):
207
208=== renamed file 'tests/test_webui.py' => 'tests/integration/test_webui.py'
209--- tests/test_webui.py 2014-11-12 12:32:19 +0000
210+++ tests/integration/test_webui.py 2014-11-25 15:45:34 +0000
211@@ -32,7 +32,7 @@
212 cases,
213 )
214
215-import deployers
216+from testing import deployers
217
218
219 class WebUITest(cases.SSTTestCase):
220
221=== added directory 'tests/project'
222=== added file 'tests/project/__init__.py'
223=== renamed file 'tests/test_style.py' => 'tests/project/test_static.py'
224--- tests/test_style.py 2014-11-25 15:45:34 +0000
225+++ tests/project/test_static.py 2014-11-25 15:45:34 +0000
226@@ -18,34 +18,6 @@
227 import unittest
228
229
230-HERE = os.path.abspath(os.path.dirname(__file__))
231-
232-
233-from testing import styles
234-
235-
236-class TestPep8(styles.TestPep8):
237-
238- directory = HERE
239-
240-
241-class TestPyflakes(styles.TestPyflakes):
242-
243- directory = HERE
244-
245-
246-class TestBinPep8(styles.TestPep8):
247- """Pep8 tests for the 'bin' directory in branch root."""
248-
249- directory = os.path.abspath(os.path.join(HERE, '..', 'bin'))
250-
251-
252-class TestBinPyflakes(styles.TestPyflakes):
253- """Pyflakes tests for the 'bin' directory in branch root."""
254-
255- directory = os.path.abspath(os.path.join(HERE, '..', 'bin'))
256-
257-
258 class TestStatic(unittest.TestCase):
259
260 def test_no_bare_exit(self):
261
262=== added file 'tests/project/test_style.py'
263--- tests/project/test_style.py 1970-01-01 00:00:00 +0000
264+++ tests/project/test_style.py 2014-11-25 15:45:34 +0000
265@@ -0,0 +1,45 @@
266+# Ubuntu CI Engine
267+# Copyright 2014 Canonical Ltd.
268+
269+# This program is free software: you can redistribute it and/or modify it
270+# under the terms of the GNU Affero General Public License version 3, as
271+# published by the Free Software Foundation.
272+
273+# This program is distributed in the hope that it will be useful, but
274+# WITHOUT ANY WARRANTY; without even the implied warranties of
275+# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
276+# PURPOSE. See the GNU Affero General Public License for more details.
277+
278+# You should have received a copy of the GNU Affero General Public License
279+# along with this program. If not, see <http://www.gnu.org/licenses/>.
280+
281+import os
282+import unittest
283+
284+
285+HERE = os.path.abspath(os.path.dirname(__file__))
286+
287+
288+from testing import styles
289+
290+
291+class TestPep8(styles.TestPep8):
292+
293+ directory = HERE
294+
295+
296+class TestPyflakes(styles.TestPyflakes):
297+
298+ directory = HERE
299+
300+
301+class TestBinPep8(styles.TestPep8):
302+ """Pep8 tests for the 'bin' directory in branch root."""
303+
304+ directory = os.path.abspath(os.path.join(HERE, '..', 'bin'))
305+
306+
307+class TestBinPyflakes(styles.TestPyflakes):
308+ """Pyflakes tests for the 'bin' directory in branch root."""
309+
310+ directory = os.path.abspath(os.path.join(HERE, '..', 'bin'))

Subscribers

People subscribed via source and target branches

to all changes: