Merge lp:~cjohnston/ubuntu-ci-services-itself/1286181 into lp:ubuntu-ci-services-itself

Proposed by Chris Johnston
Status: Merged
Approved by: Chris Johnston
Approved revision: 291
Merged at revision: 293
Proposed branch: lp:~cjohnston/ubuntu-ci-services-itself/1286181
Merge into: lp:ubuntu-ci-services-itself
Diff against target: 94 lines (+12/-8)
3 files modified
cli/tests/test_cli.py (+10/-6)
cli/tests/test_ticket.py (+1/-1)
cli/ubuntu-ci (+1/-1)
To merge this branch: bzr merge lp:~cjohnston/ubuntu-ci-services-itself/1286181
Reviewer Review Type Date Requested Status
Chris Johnston (community) Approve
Andy Doan (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+208874@code.launchpad.net

Commit message

CLI: make -a required to not blow things up in flight

Description of the change

Blowing things up is bad

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

PASSED: Continuous integration, rev:291
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/255/
Executed test runs:

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

review: Approve (continuous-integration)
Revision history for this message
Andy Doan (doanac) :
review: Approve
Revision history for this message
Chris Johnston (cjohnston) wrote :

 merge approved

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'cli/tests/test_cli.py'
--- cli/tests/test_cli.py 2014-02-21 18:18:15 +0000
+++ cli/tests/test_cli.py 2014-02-28 20:11:14 +0000
@@ -154,7 +154,7 @@
154 'data/foobar_0.1-1_source.changes')154 'data/foobar_0.1-1_source.changes')
155 args = ['create_ticket', '-t', 'New feature', '-b', '1234', '-o',155 args = ['create_ticket', '-t', 'New feature', '-b', '1234', '-o',
156 'someone@example.com', '-d', 'This is a cool new feature',156 'someone@example.com', '-d', 'This is a cool new feature',
157 '-r', 'baz', '-s', changes]157 '-a', 'foo', '-r', 'baz', '-s', changes]
158158
159 args = self.cli.parse_arguments(args)159 args = self.cli.parse_arguments(args)
160 new_ticket_ = new_ticket(args)160 new_ticket_ = new_ticket(args)
@@ -177,7 +177,7 @@
177177
178 args = ['create_ticket', '-t', '"New feature"', '-b', '4321', '-o',178 args = ['create_ticket', '-t', '"New feature"', '-b', '4321', '-o',
179 'someone@example.com', '-d', '"This is a cool new feature"',179 'someone@example.com', '-d', '"This is a cool new feature"',
180 '-r', 'baz', '-s', changes_1, '-s', changes_2]180 '-a', 'foo', '-r', 'baz', '-s', changes_1, '-s', changes_2]
181181
182 args = self.cli.parse_arguments(args)182 args = self.cli.parse_arguments(args)
183 new_ticket_ = new_ticket(args)183 new_ticket_ = new_ticket(args)
@@ -212,6 +212,10 @@
212212
213 args.extend(['-o', 'someone@example.com'])213 args.extend(['-o', 'someone@example.com'])
214 self._test_parser_missing_arguments(214 self._test_parser_missing_arguments(
215 args, "create_ticket: error: argument -a/--add is required")
216
217 args.extend(['-a', 'foo'])
218 self._test_parser_missing_arguments(
215 args, "create_ticket: error: argument -s/--sources is required")219 args, "create_ticket: error: argument -s/--sources is required")
216220
217 # All arguments were provided. It should fail because file is not221 # All arguments were provided. It should fail because file is not
@@ -228,7 +232,7 @@
228 'data/foobar_0.1-1.dsc')232 'data/foobar_0.1-1.dsc')
229 args = ['create_ticket', '-t', '"New feature"', '-d',233 args = ['create_ticket', '-t', '"New feature"', '-d',
230 '"This is a cool new feature"', '-o', 'someone@example.com',234 '"This is a cool new feature"', '-o', 'someone@example.com',
231 '-s', wrong_changes]235 '-a', 'foo', '-s', wrong_changes]
232 with LogCapture() as lc:236 with LogCapture() as lc:
233 logger = logging.getLogger()237 logger = logging.getLogger()
234 self.cli.main(args, log=logger)238 self.cli.main(args, log=logger)
@@ -246,7 +250,7 @@
246 'data/foobar_0.1-1_dsc.changes')250 'data/foobar_0.1-1_dsc.changes')
247 args = ['create_ticket', '-t', '"New feature"', '-d',251 args = ['create_ticket', '-t', '"New feature"', '-d',
248 '"This is a cool new feature"', '-o', 'someone@example.com',252 '"This is a cool new feature"', '-o', 'someone@example.com',
249 '-s', wrong_changes]253 '-a', 'foo', '-s', wrong_changes]
250 with LogCapture() as lc:254 with LogCapture() as lc:
251 logger = logging.getLogger()255 logger = logging.getLogger()
252 self.cli.main(args, log=logger)256 self.cli.main(args, log=logger)
@@ -264,7 +268,7 @@
264 'data/foobar_0.1-1_random.changes')268 'data/foobar_0.1-1_random.changes')
265 args = ['create_ticket', '-t', '"New feature"', '-d',269 args = ['create_ticket', '-t', '"New feature"', '-d',
266 '"This is a cool new feature"', '-o', 'someone@example.com',270 '"This is a cool new feature"', '-o', 'someone@example.com',
267 '-s', wrong_changes]271 '-a', 'foo', '-s', wrong_changes]
268 with LogCapture() as lc:272 with LogCapture() as lc:
269 logger = logging.getLogger()273 logger = logging.getLogger()
270 self.cli.main(args, log=logger)274 self.cli.main(args, log=logger)
@@ -282,7 +286,7 @@
282 'data/foobar_0.1-1_unreleased.changes')286 'data/foobar_0.1-1_unreleased.changes')
283 args = ['create_ticket', '-t', '"New feature"', '-d',287 args = ['create_ticket', '-t', '"New feature"', '-d',
284 '"This is a cool new feature"', '-o', 'someone@example.com',288 '"This is a cool new feature"', '-o', 'someone@example.com',
285 '-s', wrong_changes]289 '-a', 'foo', '-s', wrong_changes]
286 with LogCapture() as lc:290 with LogCapture() as lc:
287 logger = logging.getLogger()291 logger = logging.getLogger()
288 self.cli.main(args, log=logger)292 self.cli.main(args, log=logger)
289293
=== modified file 'cli/tests/test_ticket.py'
--- cli/tests/test_ticket.py 2014-01-27 11:43:49 +0000
+++ cli/tests/test_ticket.py 2014-02-28 20:11:14 +0000
@@ -93,7 +93,7 @@
93 'data/foobar_0.1-1_source.changes')93 'data/foobar_0.1-1_source.changes')
94 args = ['create_ticket', '-t', 'New feature', '-b', '1234', '-o',94 args = ['create_ticket', '-t', 'New feature', '-b', '1234', '-o',
95 'someone@example.com', '-d', 'This is a cool new feature',95 'someone@example.com', '-d', 'This is a cool new feature',
96 '-r', 'baz', '-s', changes]96 '-a', 'foo', '-r', 'baz', '-s', changes]
9797
98 new_ticket = Ticket()98 new_ticket = Ticket()
99 args = self.cli.parse_arguments(args)99 args = self.cli.parse_arguments(args)
100100
=== modified file 'cli/ubuntu-ci'
--- cli/ubuntu-ci 2014-02-24 00:48:09 +0000
+++ cli/ubuntu-ci 2014-02-28 20:11:14 +0000
@@ -50,7 +50,7 @@
50 help='Related bug number')50 help='Related bug number')
51 ticket_parser.add_argument('-o', '--owner', required=True,51 ticket_parser.add_argument('-o', '--owner', required=True,
52 help='Email address of the ticket owner')52 help='Email address of the ticket owner')
53 ticket_parser.add_argument('-a', '--add',53 ticket_parser.add_argument('-a', '--add', required=True,
54 help='Binaries to be added to the install')54 help='Binaries to be added to the install')
55 ticket_parser.add_argument('-r', '--remove',55 ticket_parser.add_argument('-r', '--remove',
56 help='Binaries to be removed from the install')56 help='Binaries to be removed from the install')

Subscribers

People subscribed via source and target branches