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
1=== modified file 'debian/changelog'
2--- debian/changelog 2013-05-08 13:03:45 +0000
3+++ debian/changelog 2013-05-08 17:09:43 +0000
4@@ -1,3 +1,4 @@
5+<<<<<<< TREE
6 utah (0.13ubuntu1) UNRELEASED; urgency=low
7
8 [ Javier Collado ]
9@@ -9,6 +10,14 @@
10
11 -- Javier Collado <javier.collado@canonical.com> Tue, 07 May 2013 16:06:48 +0200
12
13+=======
14+utah (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
21 utah (0.12ubuntu1) quantal; urgency=low
22
23 [ Dmitrijs Ledkovs ]
24
25=== modified file 'utah/client/tests/test_testsuite.py'
26--- utah/client/tests/test_testsuite.py 2013-05-01 20:51:33 +0000
27+++ utah/client/tests/test_testsuite.py 2013-05-08 17:09:43 +0000
28@@ -214,6 +214,16 @@
29 'unknown-property': 'value',
30 }])
31
32+ def test_all_overrides_at_test_level(self):
33+ """Verify that all overrides at the same level as test are valid."""
34+ self.validate(
35+ [{'test': 'test name',
36+ 'timeout': 1,
37+ 'build_cmd': '<command>',
38+ 'command': '<command>',
39+ 'run_as': '<user>',
40+ }])
41+
42 def test_empty_overrides_invalid(self):
43 """Verify an empty overrides section is invalid."""
44 with self.assertRaises(jsonschema.ValidationError):
45@@ -240,6 +250,18 @@
46 self.validate([{'test': 'test name',
47 'overrides': {'timeout': -1}}])
48
49+ def test_all_overrides(self):
50+ """Verify all properties in the overrides section are valid."""
51+ self.validate(
52+ [{'test': 'test name',
53+ 'overrides': {
54+ 'timeout': 1,
55+ 'build_cmd': '<command>',
56+ 'command': '<command>',
57+ 'run_as': '<user>',
58+ },
59+ }])
60+
61 def test_list_valid(self):
62 """Verify a list of test cases is valid."""
63 self.validate(
64
65=== modified file 'utah/client/testsuite.py'
66--- utah/client/testsuite.py 2013-04-25 16:01:31 +0000
67+++ utah/client/testsuite.py 2013-05-08 17:09:43 +0000
68@@ -71,9 +71,14 @@
69 'items': {
70 'type': 'object',
71 'properties': {
72- 'test': {
73- 'type': 'string',
74+ 'test': {'type': 'string'},
75+ 'timeout': {
76+ 'type': 'integer',
77+ 'minimum': 1,
78 },
79+ 'build_cmd': {'type': 'string'},
80+ 'command': {'type': 'string'},
81+ 'run_as': {'type': 'string'},
82 'overrides': {
83 'type': 'object',
84 'properties': {

Subscribers

People subscribed via source and target branches