Merge lp:~javier.collado/utah/bug1177787 into lp:utah

Proposed by Javier Collado
Status: Merged
Approved by: Javier Collado
Approved revision: 889
Merged at revision: 895
Proposed branch: lp:~javier.collado/utah/bug1177787
Merge into: lp:utah
Diff against target: 84 lines (+38/-2) (has conflicts)
3 files modified
debian/changelog (+9/-0)
utah/client/tests/test_testsuite.py (+22/-0)
utah/client/testsuite.py (+7/-2)
Text conflict in debian/changelog
To merge this branch: bzr merge lp:~javier.collado/utah/bug1177787
Reviewer Review Type Date Requested Status
Javier Collado (community) Approve
Review via email: mp+163015@code.launchpad.net

Description of the change

This branch updates the test suite schema to make it possible to override
values in "tslist.run" adding them directly at the same level as "tests"
instead of inside "overrides".

I've looked in the merge request that caused this problem trying to find if
some code was removed to use the values found this way as override values, but
I haven't found any.

Then, I've looked into the code to make sure this is correctly handled, but I
haven't found any place in which this happens.

Then, I've run `utah/client/tests/test_testsuite.py:TestTestSuite.test_run`
with an updated `utah/client/examples/examples/tslist.run` and, unless there's
some configuration problem on my side, it looks like the override value isn't
really being used at all.

This makes me feel uneasy because it seems that this schema update is good with
regard to not breaking run list validation for old test suites, but it's
deceptive because, if my test results are correct, there isn't any code that
supports what is being requested in the runlist.

To post a comment you must log in.
Revision history for this message
Javier Collado (javier.collado) wrote :

I'm rejecting this request because the target branch isn't the right one.

review: Disapprove
Revision history for this message
Andy Doan (doanac) wrote :

wait - we still need this in our trunk as well, right?

Revision history for this message
Javier Collado (javier.collado) wrote :

Yes, you're right. Since I see you merged the changes into lp:~utah/utah/0.12 I assume these changes are fine for lp:utah

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2013-05-08 13:03:45 +0000
+++ debian/changelog 2013-05-08 17:09:43 +0000
@@ -1,3 +1,4 @@
1<<<<<<< TREE
1utah (0.13ubuntu1) UNRELEASED; urgency=low2utah (0.13ubuntu1) UNRELEASED; urgency=low
23
3 [ Javier Collado ]4 [ Javier Collado ]
@@ -9,6 +10,14 @@
910
10 -- Javier Collado <javier.collado@canonical.com> Tue, 07 May 2013 16:06:48 +020011 -- Javier Collado <javier.collado@canonical.com> Tue, 07 May 2013 16:06:48 +0200
1112
13=======
14utah (0.12.1ubuntu1) UNRELEASED; urgency=low
15
16 * Allow overrides at test level in test suite runlist (LP: #1177787)
17
18 -- Javier Collado <javier.collado@canonical.com> Wed, 08 May 2013 18:06:29 +0200
19
20>>>>>>> MERGE-SOURCE
12utah (0.12ubuntu1) quantal; urgency=low21utah (0.12ubuntu1) quantal; urgency=low
1322
14 [ Dmitrijs Ledkovs ]23 [ Dmitrijs Ledkovs ]
1524
=== modified file 'utah/client/tests/test_testsuite.py'
--- utah/client/tests/test_testsuite.py 2013-05-01 20:51:33 +0000
+++ utah/client/tests/test_testsuite.py 2013-05-08 17:09:43 +0000
@@ -214,6 +214,16 @@
214 'unknown-property': 'value',214 'unknown-property': 'value',
215 }])215 }])
216216
217 def test_all_overrides_at_test_level(self):
218 """Verify that all overrides at the same level as test are valid."""
219 self.validate(
220 [{'test': 'test name',
221 'timeout': 1,
222 'build_cmd': '<command>',
223 'command': '<command>',
224 'run_as': '<user>',
225 }])
226
217 def test_empty_overrides_invalid(self):227 def test_empty_overrides_invalid(self):
218 """Verify an empty overrides section is invalid."""228 """Verify an empty overrides section is invalid."""
219 with self.assertRaises(jsonschema.ValidationError):229 with self.assertRaises(jsonschema.ValidationError):
@@ -240,6 +250,18 @@
240 self.validate([{'test': 'test name',250 self.validate([{'test': 'test name',
241 'overrides': {'timeout': -1}}])251 'overrides': {'timeout': -1}}])
242252
253 def test_all_overrides(self):
254 """Verify all properties in the overrides section are valid."""
255 self.validate(
256 [{'test': 'test name',
257 'overrides': {
258 'timeout': 1,
259 'build_cmd': '<command>',
260 'command': '<command>',
261 'run_as': '<user>',
262 },
263 }])
264
243 def test_list_valid(self):265 def test_list_valid(self):
244 """Verify a list of test cases is valid."""266 """Verify a list of test cases is valid."""
245 self.validate(267 self.validate(
246268
=== modified file 'utah/client/testsuite.py'
--- utah/client/testsuite.py 2013-04-25 16:01:31 +0000
+++ utah/client/testsuite.py 2013-05-08 17:09:43 +0000
@@ -71,9 +71,14 @@
71 'items': {71 'items': {
72 'type': 'object',72 'type': 'object',
73 'properties': {73 'properties': {
74 'test': {74 'test': {'type': 'string'},
75 'type': 'string',75 'timeout': {
76 'type': 'integer',
77 'minimum': 1,
76 },78 },
79 'build_cmd': {'type': 'string'},
80 'command': {'type': 'string'},
81 'run_as': {'type': 'string'},
77 'overrides': {82 'overrides': {
78 'type': 'object',83 'type': 'object',
79 'properties': {84 'properties': {

Subscribers

People subscribed via source and target branches