git cl comment: require explicit --codereview with -i|--issue flag.
R=agable@chromium.org,machenbach@chromium.org
BUG=698236
Change-Id: If79f938e457f176c47badd75f78ed4ecb764ec2d
Reviewed-on: https://chromium-review.googlesource.com/456700
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
diff --git a/tests/git_cl_test.py b/tests/git_cl_test.py
index c30d688..861d369 100755
--- a/tests/git_cl_test.py
+++ b/tests/git_cl_test.py
@@ -3090,7 +3090,7 @@
sys.stdout.getvalue(),
'However, your configured .gitcookies file is missing.')
- def test_git_cl_comment_add_default(self):
+ def test_git_cl_comment_add_rietveld(self):
self.mock(git_cl._RietveldChangelistImpl, 'AddComment',
lambda _, message: self._mocked_call('AddComment', message))
self.calls = [
@@ -3098,8 +3098,8 @@
((['git', 'config', 'rietveld.server'],), 'codereview.chromium.org'),
(('AddComment', 'msg'), ''),
]
- # TODO(tandrii): --rietveld should be specified here.
- self.assertEqual(0, git_cl.main(['comment', '-i', '10', '-a', 'msg']))
+ self.assertEqual(0, git_cl.main(['comment', '--rietveld',
+ '-i', '10', '-a', 'msg']))
def test_git_cl_comment_add_gerrit(self):
self.mock(git_cl.gerrit_util, 'SetReview',