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
1=== modified file 'cli/tests/test_cli.py'
2--- cli/tests/test_cli.py 2014-02-21 18:18:15 +0000
3+++ cli/tests/test_cli.py 2014-02-28 20:11:14 +0000
4@@ -154,7 +154,7 @@
5 'data/foobar_0.1-1_source.changes')
6 args = ['create_ticket', '-t', 'New feature', '-b', '1234', '-o',
7 'someone@example.com', '-d', 'This is a cool new feature',
8- '-r', 'baz', '-s', changes]
9+ '-a', 'foo', '-r', 'baz', '-s', changes]
10
11 args = self.cli.parse_arguments(args)
12 new_ticket_ = new_ticket(args)
13@@ -177,7 +177,7 @@
14
15 args = ['create_ticket', '-t', '"New feature"', '-b', '4321', '-o',
16 'someone@example.com', '-d', '"This is a cool new feature"',
17- '-r', 'baz', '-s', changes_1, '-s', changes_2]
18+ '-a', 'foo', '-r', 'baz', '-s', changes_1, '-s', changes_2]
19
20 args = self.cli.parse_arguments(args)
21 new_ticket_ = new_ticket(args)
22@@ -212,6 +212,10 @@
23
24 args.extend(['-o', 'someone@example.com'])
25 self._test_parser_missing_arguments(
26+ args, "create_ticket: error: argument -a/--add is required")
27+
28+ args.extend(['-a', 'foo'])
29+ self._test_parser_missing_arguments(
30 args, "create_ticket: error: argument -s/--sources is required")
31
32 # All arguments were provided. It should fail because file is not
33@@ -228,7 +232,7 @@
34 'data/foobar_0.1-1.dsc')
35 args = ['create_ticket', '-t', '"New feature"', '-d',
36 '"This is a cool new feature"', '-o', 'someone@example.com',
37- '-s', wrong_changes]
38+ '-a', 'foo', '-s', wrong_changes]
39 with LogCapture() as lc:
40 logger = logging.getLogger()
41 self.cli.main(args, log=logger)
42@@ -246,7 +250,7 @@
43 'data/foobar_0.1-1_dsc.changes')
44 args = ['create_ticket', '-t', '"New feature"', '-d',
45 '"This is a cool new feature"', '-o', 'someone@example.com',
46- '-s', wrong_changes]
47+ '-a', 'foo', '-s', wrong_changes]
48 with LogCapture() as lc:
49 logger = logging.getLogger()
50 self.cli.main(args, log=logger)
51@@ -264,7 +268,7 @@
52 'data/foobar_0.1-1_random.changes')
53 args = ['create_ticket', '-t', '"New feature"', '-d',
54 '"This is a cool new feature"', '-o', 'someone@example.com',
55- '-s', wrong_changes]
56+ '-a', 'foo', '-s', wrong_changes]
57 with LogCapture() as lc:
58 logger = logging.getLogger()
59 self.cli.main(args, log=logger)
60@@ -282,7 +286,7 @@
61 'data/foobar_0.1-1_unreleased.changes')
62 args = ['create_ticket', '-t', '"New feature"', '-d',
63 '"This is a cool new feature"', '-o', 'someone@example.com',
64- '-s', wrong_changes]
65+ '-a', 'foo', '-s', wrong_changes]
66 with LogCapture() as lc:
67 logger = logging.getLogger()
68 self.cli.main(args, log=logger)
69
70=== modified file 'cli/tests/test_ticket.py'
71--- cli/tests/test_ticket.py 2014-01-27 11:43:49 +0000
72+++ cli/tests/test_ticket.py 2014-02-28 20:11:14 +0000
73@@ -93,7 +93,7 @@
74 'data/foobar_0.1-1_source.changes')
75 args = ['create_ticket', '-t', 'New feature', '-b', '1234', '-o',
76 'someone@example.com', '-d', 'This is a cool new feature',
77- '-r', 'baz', '-s', changes]
78+ '-a', 'foo', '-r', 'baz', '-s', changes]
79
80 new_ticket = Ticket()
81 args = self.cli.parse_arguments(args)
82
83=== modified file 'cli/ubuntu-ci'
84--- cli/ubuntu-ci 2014-02-24 00:48:09 +0000
85+++ cli/ubuntu-ci 2014-02-28 20:11:14 +0000
86@@ -50,7 +50,7 @@
87 help='Related bug number')
88 ticket_parser.add_argument('-o', '--owner', required=True,
89 help='Email address of the ticket owner')
90- ticket_parser.add_argument('-a', '--add',
91+ ticket_parser.add_argument('-a', '--add', required=True,
92 help='Binaries to be added to the install')
93 ticket_parser.add_argument('-r', '--remove',
94 help='Binaries to be removed from the install')

Subscribers

People subscribed via source and target branches