Merge lp:~javier.collado/utah/bug1178185 into lp:~utah/utah/0.12

Proposed by Javier Collado
Status: Merged
Merged at revision: 892
Proposed branch: lp:~javier.collado/utah/bug1178185
Merge into: lp:~utah/utah/0.12
Diff against target: 159 lines (+11/-54)
7 files modified
debian/changelog (+6/-0)
utah/client/runner.py (+1/-1)
utah/client/testcase.py (+1/-1)
utah/client/tests/test_runner.py (+0/-12)
utah/client/tests/test_testcase.py (+0/-26)
utah/client/tests/test_testsuite.py (+0/-11)
utah/client/testsuite.py (+3/-3)
To merge this branch: bzr merge lp:~javier.collado/utah/bug1178185
Reviewer Review Type Date Requested Status
Andy Doan (community) Approve
Review via email: mp+163122@code.launchpad.net

Description of the change

This branch updates the schema to allow zero timeout values and let the files
that use it validate.

To post a comment you must log in.
Revision history for this message
Andy Doan (doanac) :
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 22:24:02 +0000
3+++ debian/changelog 2013-05-09 10:04:28 +0000
4@@ -1,3 +1,9 @@
5+utah (0.12.2ubuntu1) UNRELEASED; urgency=low
6+
7+ * Updated schema to allow zero timeout values (LP: #1178185)
8+
9+ -- Javier Collado <javier.collado@canonical.com> Thu, 09 May 2013 12:02:19 +0200
10+
11 utah (0.12.1ubuntu1) raring; urgency=low
12
13 * Allow overrides at test level in test suite runlist (LP: #1177787)
14
15=== modified file 'utah/client/runner.py'
16--- utah/client/runner.py 2013-05-01 17:37:58 +0000
17+++ utah/client/runner.py 2013-05-09 10:04:28 +0000
18@@ -93,7 +93,7 @@
19 },
20 'timeout': {
21 'type': 'integer',
22- 'minimum': 1,
23+ 'minimum': 0,
24 },
25 'repeat_count': {
26 'type': 'integer',
27
28=== modified file 'utah/client/testcase.py'
29--- utah/client/testcase.py 2013-04-29 21:04:46 +0000
30+++ utah/client/testcase.py 2013-05-09 10:04:28 +0000
31@@ -67,7 +67,7 @@
32 },
33 'timeout': {
34 'type': 'integer',
35- 'minimum': 1,
36+ 'minimum': 0,
37 },
38 'build_cmd': {'type': 'string'},
39 'command': {'type': 'string'},
40
41=== modified file 'utah/client/tests/test_runner.py'
42--- utah/client/tests/test_runner.py 2013-05-01 17:37:58 +0000
43+++ utah/client/tests/test_runner.py 2013-05-09 10:04:28 +0000
44@@ -380,18 +380,6 @@
45 'battery_measurements': True,
46 })
47
48- def test_zero_timeout_invalid(self):
49- """A zero timeout is invalid"""
50- with self.assertRaises(jsonschema.ValidationError):
51- self.validate({
52- 'testsuites': [{
53- 'name': 'name',
54- 'fetch_method': 'dev',
55- 'fetch_location': 'fetch location',
56- }],
57- 'timeout': 0,
58- })
59-
60 def test_negative_timeout_invalid(self):
61 """A negative timeout is invalid"""
62 with self.assertRaises(jsonschema.ValidationError):
63
64=== modified file 'utah/client/tests/test_testcase.py'
65--- utah/client/tests/test_testcase.py 2013-04-29 21:04:46 +0000
66+++ utah/client/tests/test_testcase.py 2013-05-09 10:04:28 +0000
67@@ -229,32 +229,6 @@
68 'run_as': 'run_as',
69 })
70
71- def test_zero_timeout_invalid(self):
72- """A zero timeout is invalid"""
73- with self.assertRaises(jsonschema.ValidationError):
74- self.validate({
75- 'description': 'description',
76- 'dependencies': 'dependencies',
77- 'action': 'action',
78- 'expected_results': 'expected_results',
79- 'command': 'command',
80- 'run_as': 'run_as',
81- 'timeout': 0,
82- })
83-
84- def test_negative_timeout_invalid(self):
85- """A negative timeout is invalid"""
86- with self.assertRaises(jsonschema.ValidationError):
87- self.validate({
88- 'description': 'description',
89- 'dependencies': 'dependencies',
90- 'action': 'action',
91- 'expected_results': 'expected_results',
92- 'command': 'command',
93- 'run_as': 'run_as',
94- 'timeout': -1
95- })
96-
97 def test_type_userland_valid(self):
98 """Userland type is valid."""
99 self.validate({
100
101=== modified file 'utah/client/tests/test_testsuite.py'
102--- utah/client/tests/test_testsuite.py 2013-05-08 16:01:00 +0000
103+++ utah/client/tests/test_testsuite.py 2013-05-09 10:04:28 +0000
104@@ -230,12 +230,6 @@
105 'overrides': {'unknown-property': 'value'}
106 }])
107
108- def test_zero_timeout_invalid(self):
109- """A zero timeout is invalid"""
110- with self.assertRaises(jsonschema.ValidationError):
111- self.validate([{'test': 'test name',
112- 'overrides': {'timeout': 0}}])
113-
114 def test_negative_timeout_invalid(self):
115 """A negative timeout is invalid"""
116 with self.assertRaises(jsonschema.ValidationError):
117@@ -296,11 +290,6 @@
118 with self.assertRaises(jsonschema.ValidationError):
119 self.validate({'unknown-property': 'value'})
120
121- def test_zero_timeout_invalid(self):
122- """A zero timeout is invalid."""
123- with self.assertRaises(jsonschema.ValidationError):
124- self.validate({'timeout': 0})
125-
126 def test_negative_timeout_invalid(self):
127 """A negative timeout is invalid."""
128 with self.assertRaises(jsonschema.ValidationError):
129
130=== modified file 'utah/client/testsuite.py'
131--- utah/client/testsuite.py 2013-05-08 16:01:00 +0000
132+++ utah/client/testsuite.py 2013-05-09 10:04:28 +0000
133@@ -74,7 +74,7 @@
134 'test': {'type': 'string'},
135 'timeout': {
136 'type': 'integer',
137- 'minimum': 1,
138+ 'minimum': 0,
139 },
140 'build_cmd': {'type': 'string'},
141 'command': {'type': 'string'},
142@@ -84,7 +84,7 @@
143 'properties': {
144 'timeout': {
145 'type': 'integer',
146- 'minimum': 1,
147+ 'minimum': 0,
148 },
149 'build_cmd': {'type': 'string'},
150 'command': {'type': 'string'},
151@@ -105,7 +105,7 @@
152 'properties': {
153 'timeout': {
154 'type': 'integer',
155- 'minimum': 1,
156+ 'minimum': 0,
157 },
158 'build_cmd': {'type': 'string'},
159 'ts_setup': {'type': 'string'},

Subscribers

People subscribed via source and target branches

to all changes: